x97wehner Posted September 4 Share Posted September 4 We use pop up module by Rolige, https://addons.prestashop.com/en/promotions-gifts/41771-smart-popup-newsletter-popup.html. It has worked great for years, but with the latest bleeding edge update, we now get the below error. I checked with the developer and he, as I expected, will only provide minimal support since this is not actually prestashop. He did advise that this issue is usually caused by a permissions issue. His actual words "file permissions, be sure that all your files are accesible, normally 0755 for directories and 0644 for files." My question is likely for @datakick, but is there something related to newsletter subscriptions that would have changed in the latest bleeding edge versions and would have caused this issue? If so, ho would I resolve it? I appreciate the help. Link to comment Share on other sites More sharing options...
x97wehner Posted September 4 Author Share Posted September 4 This is the console error: Link to comment Share on other sites More sharing options...
x97wehner Posted September 4 Author Share Posted September 4 (edited) And this is the snippet of code driving the error message: <?php /** * Smart Popup (Newsletter Popup) * * @author Rolige <www.rolige.com> * @copyright Since 2011 Rolige - All Rights Reserved * @license Proprietary and confidential */ require_once dirname(__FILE__) . '/../../../config/config.inc.php'; require_once dirname(__FILE__) . '/../../../init.php'; require_once dirname(__FILE__) . '/../rg_smartpopup.php'; $module = new Rg_SmartPopup(); if ($module->active && $module->public_key == Tools::getValue('public_key')) { $json = Tools::file_get_contents('php://input'); $data = json_decode($json, true); if (!$data || !isset($data['rgsp_id']) || !isset($data['rgsp_token'])) { RgSpTools::log('Subscription: Data error', $data); die(json_encode([ 'result' => RgSpSubscriber::RESPONSE_ERROR, 'msg' => $module->l('An unexpected error occurred, please try again later.', 'subscription'), ])); } Edited September 4 by x97wehner Link to comment Share on other sites More sharing options...
theMerchantDev Posted September 5 Share Posted September 5 5 hours ago, x97wehner said: RgSpTools::log('Subscription: Data error', $data); Check what was logged from this line. If nothing clear, try to change $data for $data['rgsp_id'] and $data['rgsp_token'], or even $json, in the log calling. Link to comment Share on other sites More sharing options...
datakick Posted September 5 Share Posted September 5 the server responded with 500 error code. Check for errors in collectlogs module. Link to comment Share on other sites More sharing options...
x97wehner Posted Sunday at 09:32 PM Author Share Posted Sunday at 09:32 PM On 9/5/2024 at 1:01 AM, datakick said: the server responded with 500 error code. Check for errors in collectlogs module. I was able to validate that this is only happening on bleeding edge. I flipped it back to 1.5 stable and it works perfectly. Update to the latest bleeding edge, and I get the same issue. There is nothing being logged in the tb /log directory or on the collectlogs module. This has only been an issue since I updated to bleeding edge about two weeks ago and remains an issue with the latest update. It appears to be a bug in the latest tb updates. Any idea what could be causing it @datakick? Link to comment Share on other sites More sharing options...
datakick Posted Monday at 06:07 AM Share Posted Monday at 06:07 AM @x97wehner Without error logs, it's not possible to say what is causing this. The module probably catch the exception, and returns this generic error message. You will have to modify the place where this happens, and add some additional logging -- display exception to output, or re-throw it and let collectlogs catch and log it. Or something similar. Link to comment Share on other sites More sharing options...
theMerchantDev Posted Monday at 11:09 AM Share Posted Monday at 11:09 AM Sorry, but it's so easy to say "bug" while you didn't even find the log of your module. Please check the module page configuration for a tab like Log. Link to comment Share on other sites More sharing options...
x97wehner Posted 17 hours ago Author Share Posted 17 hours ago This ended up being a TB bug in BE that @datakick resolved quickly. Thanks again for the fast resolution. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now