Skip to content

Link field not working in WP 4.7 #207

Closed

Description

@pjbtwo

What I expected

Expected to add a link to a page

What happened instead

In link pop-up window you must specify open in new window for link to work. If I leave checkbox unchecked, no link is added. Console reports javascript error:

VM949:24 Uncaught ReferenceError: target is not defined(…)
(anonymous function) @ VM949:24
c @ load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery…:112
value @ link.js:146
dispatch @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7:3
r.handle @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7:3

Steps to reproduce

Try to add a link to any page or post with WP v 4.7

What versions of softwares are you using?

  • Browser: Chrome 54.0.2840.98
  • Papi: 3.1.17
  • WordPress: 4.7

Activity

  1. frozzare commented on Dec 12, 2016

    @frozzare
    Member
  2. pjbtwo commented on Dec 12, 2016

    @pjbtwo
    Author

    I think I found something. It seems wpLink.getAttrs() doesn't return target if the checkbox is left unchecked. I put a little check in render() method of Link in link.js to see if target is present or not. If not present I set it to '_self' else I leave it. Seems to have fixed the problem but I leave it up to you to do it correct in source files.

  3. added this to the v3.1.18 milestone on Dec 12, 2016
  4. frozzare commented on Dec 13, 2016

    @frozzare
    Member

    @pjbtwo fixed in 3.x branch by @rasmusbe, new patch release will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions