Viewing 9 replies - 1 through 9 (of 9 total)
  • I also have issue with 4.2.1. I’m able to add field with Link Picker field, but in the post edit page, when I click on the Link chooser button, the modal windows open 1 second and close immediately after without I have the chance to click on something.

    I just came across this same issue. Clicking on the “Edit Link” button causes the page to refresh which makes it appear as though the dialog is opening and immediately closing.

    I was able to resolve the issue by calling preventDefault() on the event immediately when the click is triggered. You’ll find it near the top of the /js/input.js file.

    Line 11, Changed:

    var thisID = jQuery(this).attr("id");

    To:

    event.preventDefault();
    var thisID = jQuery(this).attr("id");

    EDIT:

    I just noticed that other similar functions within the JavaScript accomplish this same thing following a slightly different methodology that utilizes a ternary operator. I’m assuming for backwards compatibility with older browsers.

    In the interest of keeping this consistent, I’ve updated the code as follows.

    event.preventDefault ? event.preventDefault() : event.returnValue = false;
    var thisID = jQuery(this).attr("id");

    Thank you for your answer. I don’T know yet, if I will use this plugin who seem not really maintain or put a 25$ on ACF PRO who got the URL field include.

    I experienced the same problem. The solve by pandymic worked for me. Thanks!

    Worked for me, @pandymic. Thanks!

    @bdube30

    The advantage of using this plugin is that you can specify the link text without having to add another field. ACF PRO is worth every penny but the Page Link field does not let you specify the link text, so you would need another text field for that.

    I was testing the fix @pandymic posted. And it works, but this plugin has a other issues:

    1. The link “title” no longer works because that was removed from WP recently.

    2. The link “text” does not work. You can enter the text but it won’t save or show up in the custom field.

    3. When you click on the edit button, the popup does not display the values to be edited.

    4. I get an JS error every time I click on “insert/edit” link.
    Error: TypeError: Cannot read property ‘selectionStart’ of undefined

    I was able to fix issue 1 by adding a plugin the re-enables the title field in WP.
    I was able to fix issues 2 and 3 by modifying input.js and acf-link_picker-v5.php

    However I am not sure how to prevent the JS (issue 4), because the popup window expects some parameters that are not not being passed by this plugin.

    Work for me with this fork on GIT

    https://github.com/ahebrank/ACF-Link-Picker-Field

    Plugin Author BIOSTALL

    (@biostall)

    The plugin has just been updated to incorporate a lot of the fixes submitted in GitHub PRs

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Incompatible with 4.2.1?’ is closed to new replies.