Christopher Short Posted February 4 Share Posted February 4 I have over 600 errors- https://www.csrocketry.com/xxxxxx/%PRIVACY_URL% the x is different product categories or item. Ideas? I have a valid privacy policy on the site. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 4 Share Posted February 4 Where is this list from? Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 4 Author Share Posted February 4 Web crawling software Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 4 Share Posted February 4 In the code, I find %PRIVACY_URL% in the template that shows the "We use cookies" message. Looking at that code, initially, I think I see a logic bug. (/classes/gui.class.php, near lines 956-962.) Be back later. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 4 Share Posted February 4 Let's confirm a few things: The following code has not changed: /classes/gui.class.php, near lines 956-963: if (Config::getInstance()->get('config', 'cookie_dialogue') && !isset($_COOKIE['accept_cookies'])) { if ($privacy = $GLOBALS['db']->select('CubeCart_documents', 'doc_id', array('doc_privacy' => '1'))) { $dialogue = str_replace(array('%s','%PRIVACY_URL%'), array($GLOBALS['config']->get('config', 'store_name'), $GLOBALS['seo']->buildURL('doc', $privacy[0]['doc_id'])), $GLOBALS['language']->notification['cookie_dialogue']); } else { $dialogue = str_replace('%s', $GLOBALS['config']->get('config', 'store_name'), $GLOBALS['language']->notification['cookie_dialogue']); $dialogue = preg_replace('/<\/?a[^>]*>/', '', $dialogue); } $GLOBALS['smarty']->assign('COOKIE_DIALOGUE_TEXT', $dialogue); ------------------------- Using skin template box.eu_cookie.php which uses {$COOKIE_DIALOGUE_TEXT}. ------------------------- In /language/definitions.xml, in the group 'notification', the key "cookie_dialogue" is: %s uses cookies. For more detailed information about these cookies please see our <a href="%PRIVACY_URL%">privacy policy</a>. Please accept to continue or block all non-essential cookies. ------------------------- The logic error I thought I saw was that if CubeCart has not identified a document as a 'Privacy" document (admin, Documents, Privacy table column), then just the non-link phrase "privacy policy" should appear in the banner message, as there being an attempt to strip the <a> tags. But your banner has a link, so there must be a document so identified. That means, somehow, the str_replace() isn't replacing %PRIVACY_URL% in the language phrase with the name of the identified privacy document. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 4 Author Share Posted February 4 (edited) 4 hours ago, bsmither said: Let's confirm a few things: The following code has not changed: /classes/gui.class.php, near lines 956-963: if (Config::getInstance()->get('config', 'cookie_dialogue') && !isset($_COOKIE['accept_cookies'])) { if ($privacy = $GLOBALS['db']->select('CubeCart_documents', 'doc_id', array('doc_privacy' => '1'))) { $dialogue = str_replace(array('%s','%PRIVACY_URL%'), array($GLOBALS['config']->get('config', 'store_name'), $GLOBALS['seo']->buildURL('doc', $privacy[0]['doc_id'])), $GLOBALS['language']->notification['cookie_dialogue']); } else { $dialogue = str_replace('%s', $GLOBALS['config']->get('config', 'store_name'), $GLOBALS['language']->notification['cookie_dialogue']); $dialogue = preg_replace('/<\/?a[^>]*>/', '', $dialogue); } $GLOBALS['smarty']->assign('COOKIE_DIALOGUE_TEXT', $dialogue); ------------------------- Using skin template box.eu_cookie.php which uses {$COOKIE_DIALOGUE_TEXT}. ------------------------- In /language/definitions.xml, in the group 'notification', the key "cookie_dialogue" is: %s uses cookies. For more detailed information about these cookies please see our <a href="%PRIVACY_URL%">privacy policy</a>. Please accept to continue or block all non-essential cookies. ------------------------- The logic error I thought I saw was that if CubeCart has not identified a document as a 'Privacy" document (admin, Documents, Privacy table column), then just the non-link phrase "privacy policy" should appear in the banner message, as there being an attempt to strip the <a> tags. But your banner has a link, so there must be a document so identified. That means, somehow, the str_replace() isn't replacing %PRIVACY_URL% in the language phrase with the name of the identified privacy document. here is the definitions.xml file. definitions.zip everything else matched It looks like a closing </string> is missing part way down, line 855 Edited February 4 by Christopher Short Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 5 Share Posted February 5 No, that is just a multi-line phrase. There are line ending characters in the string. There is the matching </string> on line 860. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 5 Author Share Posted February 5 2 minutes ago, bsmither said: No, that is just a multi-line phrase. There are line ending characters in the string. There is the matching </string> on line 860. Color of text turned all white at that point, hence why I thought it. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 5 Share Posted February 5 For my information, what program are you using to view this file that caused the text to turn white after the first newline character? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 5 Share Posted February 5 For your document identified as the Privacy document, does this document have any redirect setting? Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 5 Author Share Posted February 5 2 hours ago, bsmither said: For my information, what program are you using to view this file that caused the text to turn white after the first newline character? Notepad ++ 1 hour ago, bsmither said: For your document identified as the Privacy document, does this document have any redirect setting? Not that I can see or know of. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 5 Share Posted February 5 (edited) Ok, I'll do some experiments to try to reproduce the issue. In the meantime, do you feel the need to have the Cookie Compliance dialog enabled? If not, in admin, Store Settings, Extra tab, uncheck the GDPR Cookie Compliance checkbox. Then clear Cubecart's cache. Edited February 5 by bsmither Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 5 Author Share Posted February 5 40 minutes ago, bsmither said: Ok, I'll do some experiments to try to reproduce the issue. In the meantime, do you feel the need to have the Cookie Compliance dialog enabled? If not, in admin, Store Settings, Extra tab, uncheck the GDPR Cookie Compliance checkbox. Then clear Cubecart's cache. Am I legally required to? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 5 Share Posted February 5 Al or Havenswift might have a more trustworthy answer, but for being in the USA, I *think* not so much. According to: https://cookiefirst.com/ccpa-compliance/ if you do business in the EU, then yes. If you do business in California, then yes. I still have the experiments to do. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted February 5 Author Share Posted February 5 10 minutes ago, bsmither said: Al or Havenswift might have a more trustworthy answer, but for being in the USA, I *think* not so much. According to: https://cookiefirst.com/ccpa-compliance/ if you do business in the EU, then yes. If you do business in California, then yes. I still have the experiments to do. I have a bunch of customers from California Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 6 Share Posted February 6 I have made some experiments, and if your code has not been changed (you say it hasn't in a reply above), then there may be a code snippet or plugin that uses the hook named 'class.seo.buildurl.dynamic_url'. I don't find a way to see the entire Cookie Consent table in admin, so you might want to look at the database table CubeCart_cookie_consent directly. The 'log' column has a copy of the phrase that was displayed. If those logged phrases have the <a> tag with href="%PRIVACY_URL%", then we can narrow the search of where things are going sideways. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.