• Resolved keyinora

    (@keyinora)


    Hello,

    I have already disabled all plugins and reverted to a default theme and it still is causing the below error.

    When The plugin is turned on, all CSS and JS break’s on my site.

    I have already added to my wp-config.php your plugin fix per the Pantheon.io docs

    https://pantheon.io/docs/modules-plugins-known-issues/#autoptimize

    This started happening after a recent update.

    Please let me know if I need to provide any additional information

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, some questions to begin with;
    * _how_ does the CSS & JS break? do the files 404? or do they cause an internal server error?
    * what happens if you turn CSS optimization on with the “inline all CSS”-option on?
    * what happens if you disable “aggregate JS” and/ or “aggregate CSS”?
    * “after a recent update” of what? AO or your theme or a plugin?
    * any (relevant) errors in your PHP errorlog when this happens?
    * have you reached out to Pantheon and if so, what was their feedback?

    frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    any news on this interesting topic @keyinora ? ??

    I am also experiencing this issue on Pantheon seemingly as the result of a recent plugin update.

    Did something change with the AUTOPTIMIZE_CACHE_CHILD_DIR value?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    @joetower nothing changed with AUTOPTIMIZE_CACHE_CHILD_DIR no. could you have a look at my earlier questions?

    @optimizingmatters Hello and thank you for the response.

    Here are some answers below. Just as an initial note – I am starting to think our specific site issue might be unrelated to your plugin. As I note below, I will update here if this is the case.

    * _how_ does the CSS & JS break? do the files 404? or do they cause an internal server error?
    Since the plugin’s functionality is completely disabled due to it being unable to write to the cache directory, nothing breaks or 404s. When you’re logged in to the site, you simply see an error stating:

    Autoptimize cannot write to the cache directory (/srv/bindings/c6cf2ec7251745139b2efad85e1f6408/code/web/wp-content/cache/autoptimize/), please fix to enable CSS/ JS optimization!
    

    * what happens if you turn CSS optimization on with the “inline all CSS”-option on?
    Because the plugin’s functionality is disabled, you can not access any of the plugin’s configuration in the admin interface. So I can not view any options to toggle functionality and troubleshoot further.

    * what happens if you disable “aggregate JS” and/ or “aggregate CSS”?
    Same as above. The plugin is effectively disabled if it can not write to the cache directory.

    * “after a recent update” of what? AO or your theme or a plugin?
    I am now thinking that the error we’re seeing is either specific to this site’s setup or Pantheon environment. I realize this question was directed at the OP. In my case, I discovered the issue while updating WordPress to 5.2.2 and the Autoptimize plugin to 2.5.2.

    If we discover that this error is due to a site-specific build setup (we use a composer-based continuous integration setup for this site) which may be causing this issue. We’re just trying to troubleshoot all options right now. I will post here if this was the cause of the issue on our end.

    * any (relevant) errors in your PHP errorlog when this happens?
    There are no relevant errors in our PHP logs.

    * have you reached out to Pantheon and if so, what was their feedback?
    I will do this next.

    Totally unrelated, but important – thank you for creating an awesome plugin and caring about front-end performance in WordPress.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, so it does seem the constant AUTOPTIMIZE_CACHE_CHILD_DIR is not available, maybe add it higher up in your wp-config.php ?

    (and thanks for the compliment! ?? )

    @optimizingmatters As an update on the issue I was experiencing: our issue had to do with our build setup not properly copying over our wp-config.php file into the build directory on Pantheon. Which means that the fix for Pantheon and Autoptimize in setting a different location via AUTOPTIMIZE_CACHE_CHILD_DIR isn’t being read at all, prompting the failure.

    So on my end, the issue the OP discussed is resolved. Thanks again for your assistance here and again, for creating a great plugin. I appreciate your responsiveness.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    thanks for the feedback, feel free to leave a review of the plugin and support here! ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Plugin no longer working on Pantheon (hosting provider)’ is closed to new replies.