Support

Home Forums Event Espresso Premium Cannot save promo code settings on Events

Cannot save promo code settings on Events

Posted: April 4, 2013 at 6:57 am


Scott Prath

April 4, 2013 at 6:57 am

I am attempting to debug an issue where the promo code functionality cannot be enabled for events.

I select ‘Yes’ for Allow discount codes? on the event edit screen and select at least one of the available promo codes set up in the system. I then save the event, but the updated promo data does not appear to be saved and resets back to its default state when I revisit the page.

Also, I appear to be getting a page not found when updating the event, and suspect the problem lies there.

I checked the EE log and do not see any errors there. This installation is about 6 mos. old and I suspect that the issue may have happened on a recent upgrade.

Has anyone seen this before? Any suggestions?

I’m using WordPress 3.5.1 and Event Espresso Premium 3.1.31.

An example event registration page is:
https://www.bilinguistics.com/event-registration/?ee=7

Thanks!


Dean

April 4, 2013 at 7:59 am

Hi Scott,

The first thing I would look at is your jQuery, you are running two version simultaneously, the correct one from WP and an old version via the theme. That may be causing the issue.

If not, then you would be best doing a full troubleshoot (deactivate plugins except EE and revert to default theme and bring them back online one at a time testing the promo code each time).

If that still fails to pinpoint the issue, I can more than happily take a look at the site if you provide login details, but let me know if the jQuery and troubleshooting resolve it.


Scott Prath

April 4, 2013 at 9:56 am

Thank you Dean.

I’ve removed the theme’s version of jquery, and then spent some time deactivating all plugins besides EE. I also switched to the Twenty Twelve theme, and the issue persisted across each scenario.

What’s the best way for me to send you a login?


Sidney Harrell

April 4, 2013 at 11:54 am

You can use the form here.


Scott Prath

April 4, 2013 at 12:38 pm

Thanks. The info has been submitted.


Josh

  • Support Staff

April 5, 2013 at 9:29 am

Hi Scott,

The page not found error seemed to be a permalink issue. I logged in and flushed the rewrite rules by saving the Permalinks settings page and all seems to be working now.


Scott Prath

April 5, 2013 at 9:59 am

Hi Josh,
I went back through the event and it still doesn’t show the place to put in the promo code. We have a different type of event on the same website and the promocode box and functionality is working there.https://www.bilinguistics.com/event-registration/?ee=2

but not here:
https://www.bilinguistics.com/event-registration/?ee=7


Josh

  • Support Staff

April 5, 2013 at 11:08 am

Hi Scott,

This might be from something in the .htaccess file, because it keeps redirecting me away from the event editor when I try to save the event, but it changes if I set the permalinks to use the WP default permalink setting. You can troubleshoot this by FTP’ing into the site, then make a backup of the .htaccess access file. Then clear out the .htaccess file that is there. Then resave the permalink settings page and try editing the event again.


Scott Prath

April 6, 2013 at 9:26 am

Hi Josh,

Good news. I found the issue. It was a link in the Event Meta fields.

‘registration_link’ was set to https://cc.readytalk.com/r/7wycea0yxa5w

It looks like EE is not escaping the meta field values, so the link was breaking the post update. I removed the link from the meta data and that fixed.

However, be able to set a event registration link like this is critical for our overall solution. Do you have any suggestions on a fix? Is there a reason why you guys aren’t escaping those values?

Thanks,
Scott


Sidney Harrell

April 7, 2013 at 8:53 pm

That’s strange, I put that registration_link into my Event Meta data and was then able to update the promo codes without problem.
Those fields are run through a sanitization routine, but there is nothing in that url that needs sanitization.


Scott Prath

April 8, 2013 at 9:11 am

When I remove that link value from the Event Meta I’m able to save the Event with the promo codes enabled. When the link is in the Event Meta I get the same page not found redirect error.

However, even with the link removed (which we need to be in there), the payment page still does not show a field for a promo code. You can see the issue on this event:
http://www.bilinguistics.com/wp-admin/admin.php?page=events&action=edit&event_id=9

Thanks,
Scott


Josh

  • Support Staff

April 8, 2013 at 11:36 am

Hi Scott,

Did you mean the event here:

https://www.bilinguistics.com/event-registration/?ee=9

The promo code fields in ee 3.1.x get displayed on the registration form page, and in this case the promo code field is displaying when I check the event with the ID of 9 on your site.

Did you check your .htaccess file? I was having trouble saving any of the events when I checked last week, it seems the only way I could get an event to save was by temporarily switching to the default permalink option.


Scott Prath

April 8, 2013 at 3:04 pm

Thanks Josh. I see it now, and was expecting it to be displayed on the payment info page. No problem.

Yes, I did check and reset the .htaccess file. Here is what is in it now:

php_value memory_limit 64M

BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

END WordPress


Josh

  • Support Staff

April 9, 2013 at 11:28 am

Hi Scott,

That looks like the standard WP .htaccess file. I tried adding the same link to a meta key on my test site and it worked without breaking the promo codes. Can you try turning on the WordPress debugging feature and see what happens if you try to save the event with the meta key in place?


Scott Prath

April 9, 2013 at 2:25 pm

Josh,

Did the meta value with a link in there save? I can’t get it save in the metadata fields at all.

I turned on WordPress debugging and there is nothing of significance in the log. Just some deprecated notices from the theme and a few plugins.

Even so, I tried it using Twenty Eleven and all plugins deactivated except for EE and still couldn’t get it to save.


Josh

  • Support Staff

April 9, 2013 at 2:39 pm

Hi Scott,

The meta value did save for me when I tried it on my test site. Which versions of PHP and MySQL is installed on your server?


Scott Prath

April 9, 2013 at 9:07 pm

We have the following versions installed:

PHP version 5.2.17
MySQL version 5.1.62-cll


Josh

  • Support Staff

April 10, 2013 at 8:22 am

Hi Scott,

I’m using the same version on one of my test servers.

Can you try creating a new event for testing and see whether it makes a difference if you use the meta key there?


Scott Prath

April 10, 2013 at 12:00 pm

Hi Josh,

I successful created a new event with the promo codes functioning well.

 

Thank you,

Scott


Scott Prath

April 10, 2013 at 1:37 pm

Well, we spoke to soon. It appears that the same problem persists, with permalinks set to default or otherwise.

I also created a brand new test event without any content but the registration_link and url value, but it doesn’t work.

Any other ideas?

Thanks,
Scott


Josh

  • Support Staff

April 11, 2013 at 9:46 am

Hi Scott,

There is an option in Event Espresso>General Settings under “Advanced options” that you can set to “Use full logging”. If you set that to yes, it will log activity to a file in /wp-content/uploads/espresso/logs that you can check for errors.

Alternatively, if you have access to the server’s error logs, there may be a MYSQL error that may help narrow down the issue.


Scott Prath

April 12, 2013 at 3:27 pm

Hi Josh,

Nothing in the server’s PHP error log, but I ran some tests with the EE logging on full and which seems to confirm that the issue is with the / character in the meta value.

I was able to successfully save the event with the following string in the ‘registration_link’ meta value: https:

Here is the success result: https://dl.dropboxusercontent.com/u/89391/espresso_log.txt.noslash

However, when I add the first /, it fails. Here is the fail result from the logs https://dl.dropboxusercontent.com/u/89391/espresso_log.txt.fail

Maybe you can identify what is happening in the logs?

Thanks,
Scott


Josh

  • Support Staff

April 16, 2013 at 10:54 am

The logs don’t tell me much, other than in the one where there’s a slash the block where it logs the event edit is missing. I’ll keep looking at this, I’ve tried testing on a few systems now and can’t reproduce it though.


Scott Prath

April 26, 2013 at 1:23 pm

Ok, well, we’re kind of dead in the water on this. Its a sticking point for our being able to successfully use EE as hoped, so any additional assistance or suggestions you can make would be helpful.

Thank you,
Scott


Josh

  • Support Staff

April 26, 2013 at 1:32 pm

Hi Scott,

Which version of Event Espresso is installed right now?


Scott Prath

April 27, 2013 at 10:40 am

Hi Josh,

We’re currently using 3.1.31.3.P.

Scott


Josh

  • Support Staff

April 29, 2013 at 1:39 pm

Hi Scott,

I checked with the current version again on two different servers and can’t reproduce this. Promo codes can be added/removed and save as expected with an event meta value contains a URL.

Do you remember what happened before when you reported:

>I successful created a new event with the promo codes functioning well.

Was something set up differently at the time to make it work?

The support post ‘Cannot save promo code settings on Events’ 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