Jump to content

404 Errors


Recommended Posts

If you are using a custom skin, or maybe one originally developed for CC5, several links are hard-coded to have .html suffixes.

Please see this conversation:

https://forums.cubecart.com/topic/57069-minimaliser-skin/

 

Link to comment
Share on other sites

22 hours ago, bsmither said:

If you are using a custom skin, or maybe one originally developed for CC5, several links are hard-coded to have .html suffixes.

Please see this conversation:

https://forums.cubecart.com/topic/57069-minimaliser-skin/

 

I was able to update the new code with .html and fix those. Thanks for this. How about :

storeurl.com/%PRIVACY_URL% at the end of a bunch of site pages, all shoing 404 on a crawl. 

 

Link to comment
Share on other sites

That looks like the "Accept Cookie Dialogue". But there is core code that is supposed to change %PRIVACY_URL% to the actual link (the Gui->_displayCookieDialogue() function).

I see you are using Foundation, and the cookie dialog seems to be displaying correctly.

Edited by bsmither
Link to comment
Share on other sites

3 hours ago, bsmither said:

That looks like the "Accept Cookie Dialogue". But there is core code that is supposed to change %PRIVACY_URL% to the actual link (the Gui->_displayCookieDialogue() function).

I see you are using Foundation, and the cookie dialog seems to be displaying correctly.

Any suggestions on how to fix it? I have 900+ 404 errors with it. 

Link to comment
Share on other sites

Please verify: in admin, Documents, in the list of documents, make sure one of the documents has the Privacy radio button checked. If there is, then a replacement should happen - where %PRIVACY_URL% becomes an actual URL.

<a href="%PRIVACY_URL%">privacy policy</a>

If not, then the <a> and </a> tags are supposed to be deleted, leaving only the friendly text.

Comparing what I see at csrocketry:

Chris Rocket Supplies, LLC 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.

Standard language phrase:

%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.

Note that there is a period as part of the friendly text for the phrase being used, where the stock phrase has the period after the closing </a> tag.

I have no idea if the preg_replace() function (to strip the link tags) will malfunction with that period as part of the friendly text.

Link to comment
Share on other sites

46 minutes ago, bsmither said:

Please verify: in admin, Documents, in the list of documents, make sure one of the documents has the Privacy radio button checked. If there is, then a replacement should happen - where %PRIVACY_URL% becomes an actual URL.

<a href="%PRIVACY_URL%">privacy policy</a>

If not, then the <a> and </a> tags are supposed to be deleted, leaving only the friendly text.

Comparing what I see at csrocketry:

Chris Rocket Supplies, LLC 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.

Standard language phrase:

%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.

Note that there is a period as part of the friendly text for the phrase being used, where the stock phrase has the period after the closing </a> tag.

I have no idea if the preg_replace() function (to strip the link tags) will malfunction with that period as part of the friendly text.

privacy radio button was already checked. Issue still exists after recreaing the privacy policy. 

I removed the period from language. 

 

Link to comment
Share on other sites

1 hour ago, bsmither said:

Please verify: in admin, Documents, in the list of documents, make sure one of the documents has the Privacy radio button checked. If there is, then a replacement should happen - where %PRIVACY_URL% becomes an actual URL.

<a href="%PRIVACY_URL%">privacy policy</a>

If not, then the <a> and </a> tags are supposed to be deleted, leaving only the friendly text.

Comparing what I see at csrocketry:

Chris Rocket Supplies, LLC 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.

Standard language phrase:

%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.

Note that there is a period as part of the friendly text for the phrase being used, where the stock phrase has the period after the closing </a> tag.

I have no idea if the preg_replace() function (to strip the link tags) will malfunction with that period as part of the friendly text.

where does this happen in the code? I am stuck trying to find it. 

Link to comment
Share on other sites

In the file /classes/gui.class.php, near line 945, starts the "_displayCookieDialogue()" function.

About 20 lines later starts an if() block of code that determines if the dialog should be displayed.

If so, then there is an if() block of code that tests for the presence of a site document flagged as Privacy from the database. If $privacy is found, the variable $dialog will contain the dialog language phrase simply having %s replaced with the store name, and %PRIVACY_URL% replaced with the http url of the document.

If not, then it gets just a little more complicated as %s will still get replaced with the store name, but there is a regular expression function, preg_replace(), that will remove the <a privacy_url> and </a> tags.

So, we have to assume that $privacy was found in the database.

It seems we are still dealing with this from many months ago. See:

https://forums.cubecart.com/topic/57522-404-errors/

 

Edited by bsmither
Link to comment
Share on other sites

6 hours ago, bsmither said:

In the file /classes/gui.class.php, near line 945, starts the "_displayCookieDialogue()" function.

About 20 lines later starts an if() block of code that determines if the dialog should be displayed.

If so, then there is an if() block of code that tests for the presence of a site document flagged as Privacy from the database. If $privacy is found, the variable $dialog will contain the dialog language phrase simply having %s replaced with the store name, and %PRIVACY_URL% replaced with the http url of the document.

If not, then it gets just a little more complicated as %s will still get replaced with the store name, but there is a regular expression function, preg_replace(), that will remove the <a privacy_url> and </a> tags.

So, we have to assume that $privacy was found in the database.

It seems we are still dealing with this from many months ago. See:

https://forums.cubecart.com/topic/57522-404-errors/

 

That would be true, forgot about that post but I seem to have fixed this with a direct link replacement in the language section. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...