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

Improve HTML Notes messaging when s2Member installed #504

Closed
raamdev opened this issue Jun 12, 2015 · 4 comments
Closed

Improve HTML Notes messaging when s2Member installed #504

raamdev opened this issue Jun 12, 2015 · 4 comments

Comments

@raamdev
Copy link
Contributor

@raamdev raamdev commented Jun 12, 2015

When s2Member is installed, pages that contain Pro-Forms set the ZENCACHE_ALLOWED constant to FALSE, thereby disabling caching for that particular page.

2015-06-11_21-43-21

When it's s2Member disabling caching, we should do more to explain why caching has been disabled on that particular page, i.e., because s2Member is loading some dynamic content.

@raamdev raamdev changed the title Improve HTML Notes messaging when s2Member Pro installed Improve HTML Notes messaging when s2Member installed Jun 12, 2015
@jaswrks
Copy link

@jaswrks jaswrks commented Oct 7, 2015

Next Actions

  • New feature branch: feature/504 in the websharks/zencache-pro repo.

  • Replace these lines of code with the following:

    case NC_DEBUG_ZENCACHE_ALLOWED_CONSTANT:
        if ($self->functionIsPossible('did_action') && did_action('ws_plugin__s2member_during_no_cache_constants')) {
            $reason = __('because the s2Member plugin set the PHP constant `ZENCACHE_ALLOWED` to a boolean-ish `FALSE` value at runtime. The s2Member plugin is serving content that must remain dynamic on this particular page, and therefore this page was intentionally not cached for a very good reason.', SLUG_TD);
        } else {
            $reason = __('because the PHP constant `ZENCACHE_ALLOWED` has been set to a boolean-ish `FALSE` value at runtime. Perhaps by WordPress itself, or by one of your themes/plugins. This usually means that you have a theme/plugin intentionally disabling the cache on this page; and it\'s usually for a very good reason.', SLUG_TD);
        }
        break; // Break switch handler.
  • Submit PR.

@jaswrks
Copy link

@jaswrks jaswrks commented Oct 7, 2015

@renzms While working on this issue you can learn more about the did_action() function in the WordPress core here: https://codex.wordpress.org/Function_Reference/did_action

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Oct 20, 2015

Next Pro Release Changelog:

  • Enhancement: Improved the HTML Notes generated by ZenCache when s2Member (a membership plugin for WordPress) is specifically disabling caching. s2Member automatically disables caching on certain pages that are required to remain dynamic. The HTML Notes generated by ZenCache now explain when this is happening. Props @renzms. See Issue #504.
@raamdev raamdev closed this Oct 20, 2015
@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Nov 14, 2015

ZenCache v151114 has been released and includes changes from this GitHub Issue. See the v151114 announcement for further details.


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 (#504).

@wpsharks wpsharks locked and limited conversation to collaborators Nov 14, 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
3 participants