Support

Account

Home Forums Backend Issues (wp-admin) ACF conflicting with link saving in HTML mode

Solving

ACF conflicting with link saving in HTML mode

  • Hi –

    I’ve seen this problem in ACF for some time now. Thought it was an issue with running 3.X version of the plugin, but I still see the bug in the latest version of ACF running with WP 3.5.2.

    When ACF is installed, if we try to add a link to a post in HTML mode in the WP backend, the link either does not save, or crashes the browser entirely (depending on the browser). I’ve tested this on a fresh install of WordPress 3.5.2 with only ACF 4.1.8.1 installed, and the same thing happens – when you try to add a link to a post in HTML mode, there are big problems across Firefox, IE and Safari.

    Is this a known issue? Can someone else test this to confirm I’m not going mad here?

    Thanks!
    Marcus

  • Hi @marcusjwilson

    Sounds like the issue is JS based.

    Can you open up your console log and check for JS errors when you are searching for the page link?

  • Hi Elliot – thanks for getting back to me.

    Yes, I’ve seen a couple of error in Firebug Console when trying to save a link from a Post in the HTML editor, but here’s the one that relates to ACF:

    NS_ERROR_FAILURE: Failure
    http://thepooka.org/wp-content/plugins/advanced-custom-fields/js/input.php?ver=4.1.8.1
    Line 461

    This seems to happen on first attempt to save a link in HTML mode, then I get the following error repeated for each subsequent time I try to save the link:

    NS_ERROR_FAILURE: Failure
    http://thepooka.org/wp-includes/js/wplink.min.js?ver=3.5.2
    Line 1

    This is in WP3.5.2 with latest ACF running, but I’ve also experienced the error on WP3.3.1 and on older versions of ACF version 3.

    Behaviour when trying to save a link in a post in HTML varies from browser to browser, but can often crash the browser tab altogether.

    Any help in resolving this would be appreciated. We use ACF to great effect on a number of sites, but see this issue repeatedly.

    Cheers
    Marcus

  • Hi @marcusjwilson

    Thanks for the debug info.

    The line you are referencing is this:

    
    // Hack for CPT without a content editor
    			try
    			{
    				wp.media.view.settings.post.id = acf.post_id;	
    			} 
    			catch(e)
    			{
    				// one of the objects was 'undefined'...
    			}
    

    Which to me is safely wrapped in a try / catch block. I don’t understand why this would cause an issue, but it clearly is…

  • Many thanks for getting back on this, Elliot.

    I tried to take a look at this again, and the browser crashing issue when adding links in Text editor mode seems not to be occurring now. Could be something to do with a recent upgrade to WP 3.5.2, but we’ve seen this issue come and go in the past, so I’ll check in with the client to see if it’s all fixed.

    Thanks again
    Marcus

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘ACF conflicting with link saving in HTML mode’ is closed to new replies.