Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AC Plugin Back Compat. in 150626 Broken #514

Closed
jaswrks opened this issue Jun 29, 2015 · 4 comments
Closed

AC Plugin Back Compat. in 150626 Broken #514

jaswrks opened this issue Jun 29, 2015 · 4 comments
Assignees
Milestone

Comments

@jaswrks
Copy link

@jaswrks jaswrks commented Jun 29, 2015

First reported here: https://wordpress.org/support/topic/zencache-ac-plugins-not-working-under-v150626?replies=5#post-7123044

Steps to Reproduce

  • Use the old example AC plugin from ZenCache v150409 to create a test AC plugin.
  • Save the file to: /wp-content/ac-plugins/test.php

Expected Behavior

  • That the AC plugin test will return other as the version salt for non-mobile devices during testing, even though the AC plugin is using the old API calls.

Observed Behavior

  • The old example file has stopped working in the latest release, due to a glitch in the back compat. routines we added in v150626, which incorrectly references the old class name, instead of expecting the new class name.

This is a tricky issue, because the old example file calls upon get_class($ac). Our attempt to preserve back compat. failed, because we incorrectly preserved support for the old class name, when the old example does in fact reference the new class name when it calls upon get_class($ac), where $ac is actually a reference to the new class. Somewhat deceiving at first glance.


Suggested Short-Term Solution

Attach your AC plugin filter using the updated API calls.

$ac = $GLOBALS['zencache_advanced_cache']; // ZenCache instance.
$ac->addFilter('zencache_version_salt', 'my_ac_version_salt_shaker');

See also: updated example for ZenCache v150626+

Long-Term Solution

We need to fix the back compat. routine so that existing AC plugin files do not continue to break as more and more people upgrade to ZenCache 150626+.

@jaswrks
Copy link
Author

@jaswrks jaswrks commented Jun 29, 2015

@raamdev Pull request submitted to resolve the long-term solution suggested above.

@jaswrks
Copy link
Author

@jaswrks jaswrks commented Jun 29, 2015

A fix for this issue was pushed to the latest copy of ZenCache and ZenCache Pro v150626 as part of critical revision just now. We will merge this pull request in as a part of the next official release also, but for now the issue has been resolved.

@jaswrks jaswrks self-assigned this Jun 29, 2015
pluginmirror-worker pushed a commit to wp-plugins/zencache that referenced this issue Jun 29, 2015
@raamdev raamdev added this to the Next Release (Pro) milestone Jul 10, 2015
@raamdev
Copy link
Contributor

@raamdev raamdev commented Jul 10, 2015

Next Pro Release Changelog:

  • Bug Fix: Fixed an issue with backwards compatibility that was preventing some AC Plugins from working properly. See Issue #514.
@raamdev raamdev closed this Jul 10, 2015
@raamdev
Copy link
Contributor

@raamdev raamdev commented Jul 17, 2015

This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#514).

@wpsharks wpsharks locked and limited conversation to collaborators Jul 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants