Support

Home Forums Event Espresso Premium No, Not Again: SERIOUS REGISTRATION TROUBLE! And I do mean SERIOUS!

No, Not Again: SERIOUS REGISTRATION TROUBLE! And I do mean SERIOUS!

Posted: January 29, 2015 at 4:03 pm


John Fineberg

January 29, 2015 at 4:03 pm

Well, I did have this topic resolved:

https://eventespresso.com/topic/serious-registration-trouble-and-i-do-mean-serious/

But today I read the article you suggested:

http://www.wpbeginner.com/beginners-guide/how-to-install-and-setup-wp-super-cache-for-beginners/

And now I’m back to serious trouble. Even though I have all of this entered:

wp-.*\.php
index\.php
/events/
/registration-checkout/
/transactions/
/thank-you/
/registration-cancelled/
/register/

And have deleted the cache several times. And have restored the default configuration several times. And have cleared the cache and history on my own computer several times. The problem is back: I click to sign up for one class, only to be taken to the signup for a different class.

What could be causing this?


John Fineberg

January 29, 2015 at 5:00 pm

I’ve restarted my computer. No change. I’ve tried more than one browser. No change. I’ve deleted WP Super Cache (including any saved files) and installed a fresh plugin. No change. I’ve re-added the required code to not cache EE pages. No change. And I’ve deleted and deleted and deleted the cache. Oh, and during the time between deleting and reinstalling WPSC, the problem continued. So where oh where oh where to look to find the culprit? Please help quickly, as I’m out of business until it’s fixed.


John Fineberg

January 29, 2015 at 5:04 pm

In case this bit of information helps, I installed the latest updates of EE4 today. And I also updated my theme (Dejavu 2.6, by My Site My Way) today. I don’t want to leave any stones unturned in solving this mystery.


John Fineberg

January 29, 2015 at 5:46 pm

I tried deleting WPSC again, and the problem cleared up. I reinstalled WPSC, and the problem reappeared (even after doing what I’ve be told to do for dynamic pages like EE events). Then I deleted WPSC yet again, and the problem disappeared

So there’s got to be at least one setting on WPSC that’s causing the improper caching. Thoughts as to what the setting(s) is?

The good news is that I’m not desperate to get this fixed, now that I have at least a temporary solution. However, I’d still like to cache the rest of my site for better response times.


Dean

January 30, 2015 at 4:49 am

Hi John,

The weird thing is, in my testing having or not having the following did not make any difference:

/events/
/registration-checkout/
/transactions/
/thank-you/
/registration-cancelled/
/register/

Obviously it is better to make sure that those pages never get cached, but I couldn’t get the plugin to break.

Now I don’t know what your settings are, but if like me you have not changed anything from default barring adding those whitelist items, it should work.

I would perhaps duplicate your site to a test/development server and run through some testing. Cache plugins can be really quite hard to get right sometimes.


Dean

January 30, 2015 at 5:32 am

Actually this finally kicked in and started causing me problems.

One option would be to have the whitelist and also make sure that the option “Clear all cache files when a post or page is published or updated.” is set.


John Fineberg

January 30, 2015 at 8:34 am

Thanks for stepping in, Dean. I’m glad the problems kicked in for you, too, so you could experience what I’m talking about. Are you saying that it’s not necessary to add “/register/” and the rest of that list? (Is that the whitelist you’re referring to?) Is Event Espresso somehow set to never get cached, with or without adding any strings? Do you know of a better cache plugin to use with EE4?

Speaking of plugins, do you have any recommendations for a plugin to make my site more mobile-friendly, one that you know works well with EE4?


Tony

  • Support Staff

January 31, 2015 at 10:20 am

Speaking of plugins, do you have any recommendations for a plugin to make my site more mobile-friendly, one that you know works well with EE4?

That’s not really a job for a plugin (although some may try) its based on your sites theme. If you theme is responsive, then so is EE4.

Are you saying that it’s not necessary to add “/register/” and the rest of that list? (Is that the whitelist you’re referring to?) Is Event Espresso somehow set to never get cached, with or without adding any strings?

You will always need to set Event Espresso from caching. We are taking some steps to try and ensure that Event Espresso never caches, but it will always be best to manually set all Event Espresso core pages from caching.

Do you know of a better cache plugin to use with EE4?

They all work in basically the same way so its personal preference really. The way caching works is by building pages that users view and saving them for future visitors.

So lets say you have a page of text (and maybe images), each time a user visits that page, your webserver hits the DB for the relevant data (which can happen multiple times depending on the data) builds the html output and sends it to the browser.

Then the next visitor visits the same page, the same happens all over again, and again, and again.

Caching basically saves the page the first time a visitor views it and sets ‘expiration’ on that page. So then visitors view the page and the server simply says ‘I have this page saved, here you go!’ which is find for static content, that rarely changes.

The problem with this is how do you select tickets from a page that doesn’t actually check with the DB if tickets are available? When you input your attendee info and that is sent to the server, the returning page, the server says ‘Hey I have this already’ and gives you a page, that appears totally irrelevant to your attendee. Each page EE also uses ‘nonce’ values, which is why a ‘security error’ will pop up if the pages are cached (once the nonce has expired)

So caching Event Espresso (or any other e-commerce type plugin) pages isn’t really an option. You can cache the static pages around them, but not the dynamic pages EE needs.

Its also worth noting that some of those options will update your .htaccess file with some rules. Those rules will not be removed from that file when you uninstall the plugin, so it could be these causing your problems.

If EE pages are all still set to exclude from caching, I would start by looking at your .htaccess file.


John Fineberg

January 31, 2015 at 10:48 am

Thanks, Tony. Glad to hear that you’re working on a solution to ensure that Event Espresso pages don’t ever get cached.

Everything’s working just fine right now, regarding not caching dynamic EE pages. The correct pages are appearing, so long as WP Super Cache is not installed. Or at least as long as it’s not activated. (I’m not sure which, but at this moment, it’s not installed.) It’s only when WP Super Cache is installed and activated that it’s a problem.

So, the logical thing is to not use it. Right? Except, of course, for the fact that my website is operating way too slowly. Thus, I want caching. It’s a Catch 22, isn’t it?

Do you have a suggestion for a different cache plugin that might not have the same problem that WPSC does in caching dynamic pages?

By the way, I was following you just fine … until you mentioned “.htaccess file” rules. Under the circumstances, it doesn’t seem necessary. But if I’m wrong about that, where do I find that file what should I do when I get there?


Tony

  • Support Staff

January 31, 2015 at 11:32 am

WPSC may have added rules to your .htaccess file when you enabled a setting. Those rule will still be in place now even though you have removed the plugin.

So say there’s a rule that looks within a specific directory that is created on install of WPSC, but removed when you remove WPSC. That means that the rule becomes active just by installing the plugin.

There may not be, but its where I would start looking.

So, the logical thing is to not use it. Right? Except, of course, for the fact that my website is operating way too slowly. Thus, I want caching. It’s a Catch 22, isn’t it?
Do you have a suggestion for a different cache plugin that might not have the same problem that WPSC does in caching dynamic pages?

Installing another caching plugin to work around an issue with a caching plugin is just asking for trouble in my opinion.

You want to find the issue with the current setup and fix that.

Do you have a development copy of the site, possibly on the same server? If not I suggest creating one (a subdomain for example) and working there, to find the right settings for your site/server. Working live is not recommended and prevents a panic when settings are incorrect and users can not register.


John Fineberg

January 31, 2015 at 11:59 am

So true about using a dev site. Thanks for the reminder to use it.

You want to find the issue with the current setup and fix that.

By reinstalling and reactivating WPSC, starting from untouched settings, then making new settings choices, shouldn’t that wipe the slate clean? If not, where do I find “.htaccess file” rules, what should I do when I get there? I wouldn’t recognize a mistake if I saw one.


Tony

  • Support Staff

January 31, 2015 at 12:39 pm

No, it will not remove the .htaccess rules, alot of plugins prefer not to remove them as .htaccess is often edited by the user, if they place rules within the block added by WPSC then un-install WPSC and it removes what it thinks (and should) be its own rules, the site breaks and the user (wrongly) blames WPSC.

You can see here:

https://wordpress.org/plugins/wp-super-cache/other_notes/

That .htaccess rules are not removed.

Whilst I can point you towards the right direction, we can’t really support other plugins and/or server config so you may need to post up on the WPSC forums for further help.

You will need FTP access to your site using an FTP client such as FileZilla or CyberDuck, within the root directory where WordPress is installed you.

You should see something like this – http://take.ms/oBcCI

This is a default WP .htaccess file – http://take.ms/U246N

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Be sure to keep a backup of the current file, but open that file with an editor such as SubLime Text (do not use MS Word or another Word Processor, they add formatting to files)

You may find your .htaccess has a block of rules for WPSC, separate from the code in the image above, try removing them and replace that file on your server.


John Fineberg

January 31, 2015 at 2:23 pm

I found this, but I suspect I’m not quite in the right place. I navigated to public_html. Then, since I didn’t locate .htaccess, I did a search for .htaccess, as well as cache. And there I came across:

/public_html/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/image_cache.cls.php

/public_html/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/cached_pdf_decorator.cls.php

/public_html/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/page_cache.cls.php

/public_html/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/lib/fonts/dompdf_font_family_cache.dist.php

Am I anywhere near where I want to be?


Tony

  • Support Staff

January 31, 2015 at 2:40 pm

Hmm, which ftp client are you using to view the files?


John Fineberg

January 31, 2015 at 2:46 pm

I’m using Bluehost’s own File Manager. A few days ago I tried using CyberDuck, but found that it’s not compatible with the current version of Java. You have to downgrade to a “legacy” 6 version (instead of the current 7 version) to use with Yosemite, the current Mac OS. I read so many online discussions on how basically jailbreak your Mac to allow it, so I finally gave up on CyberDuck, at least until CyberDuck and Apple settle their differences.


John Fineberg

January 31, 2015 at 2:49 pm

I just did another search and came up with these files:

/public_html/.htaccess.bak.1386867398

/public_html/.htaccess

/public_html/EE4/.htaccess

/public_html/EE4/wp-content/plugins/akismet/.htaccess

/public_html/EE4/wp-content/uploads/espresso/logs/.htaccess

/public_html/wp-content/plugins/p3-profiler/templates/.htaccess

/public_html/wp-content/plugins/p3-profiler/classes/.htaccess

/public_html/wp-content/plugins/p3-profiler/languages/.htaccess

/public_html/wp-content/plugins/p3-profiler/exceptions/.htaccess

/public_html/wp-content/plugins/akismet/.htaccess

/public_html/wp-content/uploads/profiles/.htaccess

/public_html/wp-content/uploads/espresso/logs/.htaccess

/public_html/cprtwincities/.htaccess


Tony

  • Support Staff

February 2, 2015 at 3:55 am

It could be a couple of those, it depends on how your host is setup.

It looks like you are running 3 sites, so a site from:

/public_html/ – which is the ‘root’ directory of your webserver.
/public_html/EE4/ – which is a subdirectory install.
/public_html/cprtwincities/ – which is another sub-directory install.

/public_html/cprtwincities/ is likely the directory for the site linked to your license, so check

/public_html/cprtwincities/.htaccess

Ensure you have a full site backup (all files and the DB) BEFORE making any more changes. This is obviously new ground for you (and that’s fine) but as that’s the case, you can not have ‘enough’ backups for if/when things go wrong.

It might take you some extra time when making changes, but it will save you countless hours if things do go wrong.


John Fineberg

February 2, 2015 at 8:25 am

Ah, progress! I finally found .htaccess. I had to click on “Show Hidden Files” (or something like that). Here’s what I found:

# Use PHP5.4 Single php.ini as default
AddHandler application/x-httpd-php54s .php

# BEGIN WPSuperCache
# END WPSuperCache

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

So, as there’s nothing in between these lines …

# BEGIN WPSuperCache
# END WPSuperCache

… does this mean that there are no rules at present? Is there anything I need to do at all?

Everything’s working fine right now. I just want pages to load faster. So I sure would like to have WP Super Cache (or some other caching plugin) again. But I can’t afford to have it caching dynamic EE pages. Your thoughts?


Tony

  • Support Staff

February 2, 2015 at 8:47 am

does this mean that there are no rules at present?

Yeah, there are no rules set.

Is there anything I need to do at all?

Not as far as I can see from the above.

Do you have WPSC installed, but not activated, or do you not have it installed at all?


John Fineberg

February 2, 2015 at 8:49 am

At present, it’s not even installed.


John Fineberg

February 2, 2015 at 9:16 am

Any reason to believe that, if I were to install and activate WPSC again, it would not continue to cache pages I don’t want cached?


Tony

  • Support Staff

February 2, 2015 at 9:51 am

No.

You set the exclusions manually.

So when re-installing just check those strings are still within do not cache list and WPSC should continue not to cache them.


John Fineberg

February 2, 2015 at 10:13 am

Okay, maybe there’s a problem here. After reinstalling WPSC, when I went to activate, there was this message:

WP_CACHE constant added to wp-config.php

If you continue to see this warning message please see point 5 of the Troubleshooting Guide. The WP_CACHE line must be moved up.

Here’s point 5:

Make sure the following line is in wp-config.php and it is ABOVE the “require_once(ABSPATH.’wp-settings.php’);” line:

define( ‘WP_CACHE’, true );

Before moving forward and turning caching on, is this something that could be causing a problem?


Tony

  • Support Staff

February 2, 2015 at 10:20 am

Just check the wp-config.php file within the root of your site (same place the .htaccess was) and check that this line:

define( ‘WP_CACHE’, true );

has been added above this line:

require_once(ABSPATH.’wp-settings.php’);

It may be worth opening a ticket with bluehost to have them configure this correctly for you.


John Fineberg

February 2, 2015 at 10:39 am

This is the very last thing in the wp-config.php file:

/** Absolute path to the WordPress directory. */
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . ‘wp-settings.php’);


Tony

  • Support Staff

February 2, 2015 at 10:43 am

As long as:

define( ‘WP_CACHE’, true );

is above that line somewhere, it’s fine.


John Fineberg

February 2, 2015 at 10:49 am

It’s near the top of the file:

define(‘WP_CACHE’, true);

Here goes. I’m going to try again.


John Fineberg

February 2, 2015 at 11:13 am

Nope, still not working properly. I’ve tried checking:

Use mod_rewrite to serve cache files. (Recommended)

And I’ve tried:

Use PHP to serve cache files.

I’ve tried both checking and unchecking this option:

Enable dynamic caching. Requires PHP or legacy caching. (See FAQ or wp-super-cache/plugins/dynamic-cache-test.php for example code.)

And I have all this in the not-to-be cached box:

wp-.*\.php
index\.php
/events/
/registration-checkout/
/transactions/
/thank-you/
/registration-cancelled/
/register/

Is there anything else that I should be trying?


Tony

  • Support Staff

February 2, 2015 at 11:17 am

Can you post a link to the event you are testing, and provide details of how to reproduce please?


John Fineberg

February 2, 2015 at 11:30 am

Sure. Here’s an example. First, go to: http://www.cpr-twincities.com/community/bls.

Choose any class from that page (although there are a number of pages that get the same result). That will bring you to an appropriate page. Click on “Register Now,” and everything’s just fine.

Now start all over again. Go to: http://www.cpr-twincities.com/community/cpr.

Choose a class. But then, when you click on “Register Now,” it will take you to a different class. It will take you the class you originally selected (above). You’ll be starting with signing up for “Adult and Pediatric CPR/AED,” but you’ll actually be registering for “BLS CPR/AED for Pro Rescuers and Health Care Providers.” And you might not even notice.


Tony

  • Support Staff

February 2, 2015 at 11:54 am

The /register page is still cached.

Go here: http://www.cpr-twincities.com/register in a incognito window and you’ll still find an event on that page. That should not be the case.

Go back to your WPSC do not cahce list, and where you have ‘/register/’ try using ‘/register’

Then save the settings, purge the cache and retry.


John Fineberg

February 2, 2015 at 12:34 pm

Curious that all of the other pages need backslashes, before and after, but not this one. But that did it! Thank you so much for working with me so diligently to solve this problem!


Tony

  • Support Staff

February 2, 2015 at 12:57 pm

You are most welcome, John 🙂

The support post ‘No, Not Again: SERIOUS REGISTRATION TROUBLE! And I do mean SERIOUS!’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso