strange shortcode code leak
-
I have 3 pages that work in succession to register someone for a particular event.
Page 1 – Gravity Forms form that adds a person to the database in a temp table
page 2 – displays the people added to the temp table. Has two links: 1st goes back to the form to add an additional person, 2nd goes to a completion page (page 3) that moves them to the new database, and then deletes the temp info
page 3 – Adds users to the registered people table, then deletes the old data from the temp table
———————————
Here is what my problem is (this is very simplified):
On the totals page (page 2), everything works well, except it calls the shortcode from page 3, which deletes the people. Looking at the page with debug on shows no database calls that are within page 3’s shortcode. However, if I comment out the shortcode definition for page 3’s shortcode, this problem does not happen. So page 3’s shortcode is definitely being called on page 2, even after a shortcode AND function name change. It is not being called from page 2’s code, or that would have shown a different outcome.
a simplified explanation using psuedocode is something like this:
Page 2:
[thetotals]
- SELECT * FROM temp WHERE user_id = $current_user - generate table, row for each registrant - return $output;
Page 3:
[paymentsuccesshandler]
- SELECT * FROM temp WHERE user_id = $current_user - MOVE temp_user TO permanent - DELETE temp_user - display printable confirmation, and print out registrants
So somehow, page 3 ends up getting called inside of page 2, but not even WP_DEBUG logs the DB call. I would love to show my code, but each function is about 1,000 lines of PHP code each. I am very fluent in PHP and other CMS’s, but this is my first job working with WordPress. The site is complete and live, and was tested to be working, albeit this small error that I thought was just confined to an administrator.
Now here’s the real kicker: This only happens in Firefox. Chrome, Safari, tablets, smartphones all work just fine without incident. That is where I am really confused.
If anybody can help me out, I would really appreciate it. I am open to dialog about this unique problem. I would not like to have spent hundreds of hours on this, have the site go live, then have to shut it down and refund them their money.
If someone asks, I will post both functions so you can go through them. They are just extremely long.
- The topic ‘strange shortcode code leak’ is closed to new replies.