Christopher Short Posted July 29, 2023 Share Posted July 29, 2023 (edited) Login/register and advanced search are 404 errored. Any ideas where to look to fix this? Edited July 29, 2023 by Christopher Short Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 29, 2023 Share Posted July 29, 2023 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/ Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted July 30, 2023 Author Share Posted July 30, 2023 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. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 30, 2023 Share Posted July 30, 2023 (edited) 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 July 30, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted July 30, 2023 Author Share Posted July 30, 2023 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. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 31, 2023 Share Posted July 31, 2023 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. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted July 31, 2023 Author Share Posted July 31, 2023 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. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted July 31, 2023 Author Share Posted July 31, 2023 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. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 31, 2023 Share Posted July 31, 2023 (edited) 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 July 31, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted July 31, 2023 Author Share Posted July 31, 2023 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. 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.