Jump to content

404 errors


Christopher Short

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...