Home Forums Bug Reports ACF Tabs not showing under pagesspeed module


ACF Tabs not showing under pagesspeed module

  • Hello great community,

    I was asking support same question:
    “I have issues that is caused by google pagespeed. Like I describe in a ticket subject, ACF tabs is not showing in page and I get some plenty errors in Console. I was searching solution, but without any luck :-|”
    “I am afraid I do not have much experience with the google pagesspeed and such issues are normally beyond the scope of our support.”

    So, since support have tied hands resolving this issue, I’m asking community now…does anybody have this issue/problem before, and how he is solved it? Just to tell you, everithing was working fine until I add pagespeed module in Hosting, so no single plugin brakes ACF. I will continue investigating this issue, and hope i will came up with something.


  • Ok, this is some dirty solution, but its working 😀
    I found it here . This is just documentation of how you Allow or Disallow certain files/folders on your project.
    So what I do is just Disallow input.js from ACF plugin
    pagespeed Disallow "http://yourwebsiteurl/wp-content/plugins/advanced-custom-fields/js/input.js";
    And since input.js is not going tough “fingers” of pagespeed module, everything is working fine.

  • Just a comment for people looking for anything similar. Please not that I am not the developer of ACF or do I have first hand knowledge of the module mentioned in the OP.

    The main problem with when things that combine scripts into a single file break a site is that they fail to take into account the use of localizing scripts in WP. Many plugins, including ACF rely on this localization to work.

    When a script is localized WP adds something similar to this just before the line that loads the JS file

    <script type="text/javascript">
    /* <![CDATA[ */
    var adminCommentsL10n = {"hotkeys_highlight_first":"","hotkeys_highlight_last":"","replyApprove":"Approve and Reply","reply":"Reply","warnQuickEdit":"Are you sure you want to edit this comment?\nThe changes you made will be lost.","warnCommentChanges":"Are you sure you want to do this?\nThe comment changes you made will be lost.","docTitleComments":"Comments","docTitleCommentsCount":"Comments (%s)"};
    /* ]]> */

    The above is a WP localization for /wp-admin/js/edit-comments.js
    This localized data must appear before the effected script is included in many cases because the script depends on these values to work properly.

    In other cases the combination does take this into account but it will minify this example code to a single line, which will also break the code because the CDATA tags need to be their own separate lines.

    Another thing that could break sites is that a tiny error in one JS file, when minified, could cause an error that breaks all of the scripts that are included after it.

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

The topic ‘ACF Tabs not showing under pagesspeed module’ is closed to new replies.