Hi, I am working with edmonds_bob on this project and I am the one who found the problem. I did not see any error messages. the behaviour was that bookings were not being preserved. When you booked a ticket you got the “Your booking was added to your shopping cart.” message. But if you then looked at the shopping cart the message was “You have not booked any events yet. Your cart is empty.”
I deactivated all the other plugins and added them back in until the problem recurred, and that happened when i reactivated WP Stylesheet Switcher.
i searched the support forum and found another user who had the same problem with
yet another plugin, called Paid Memberships Pro. That user made the problem go away by commenting out the session_start test. So I tried the same fix in WP Stylesheet Switcher and it worked.
I have also contacted the Events Manager Pro developers about this. Please note the response below from their chief developer, Marcus Sykes ([email protected])
My opinion is that the plugin is doing something wrong there…. I’m not sure what because those lines I don’t think are the root cause of the problem, my guess is that somewhere else in their code, they’re wiping or manipulating session variables before we get a chance to execute our code. The logic behind my assumption is if you remove the session_start() lines in their plugin, they’re trying to modify non-existent session variables which are then created properly when we run session_start and our data remains intact.
Furthermore, see the PHP docs – https://php.net/manual/en/function.session-start.php – calling session_start() twice should not cause loss of session data which is also why I’m guessing it’s something else.
You need to contact the plugin developer about it and feel free to paste this to them. I’m not saying I’m 100% right here but there’s various other plugins that work fine with EM and use sessions, so it must be something else…. If they disagree with me I’m happy to liaise with them directly and determine who’s truly at fault.
Hope that helps, sorry I couldn’t give a better solution here!