artfulweb Posted October 3, 2021 Share Posted October 3, 2021 14 hours ago, Jack_mcs said: Yes, I did. But it looks like I didn't include the changed file in the latest upload. Please try the attached file and let me know how it goes. seo.class.php Perfect Jack! All working as should. Thanks ever so much for the update. Quote Link to comment Share on other sites More sharing options...
radhavallabh Posted October 21, 2021 Share Posted October 21, 2021 On 9/22/2021 at 3:52 AM, Jack_mcs said: A new version has been uploaded with these changes. Tested through Phoenix 1.0.8.6 and php 8. Added version for Phoenix .0.8.0 and above. Changed code for php 7.4 warnings. Fixed mistake with the uninstall code. Replaced HTTP/1.x protocol checks with $_SERVER['SERVER_PROTOCOL']. Â Hi dear; is it possible we have the multi language urls with the lanuage folder name in url prior to the actual product name instead like below? https://www.xxx.com/de/yy-yy-130.html Quote Link to comment Share on other sites More sharing options...
radhavallabh Posted October 21, 2021 Share Posted October 21, 2021 Hi; Also I am getting this error on install dear version 1.0.8.6 phoenix , I used the fresh seo.class file you shared here in forum- Undefined index: QUERY_STRING in /xx/xx/xx/includes/classes/seo.class.php on line 2599 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 21, 2021 Share Posted October 21, 2021 9 hours ago, radhavallabh said: is it possible we have the multi language urls with the lanuage folder name in url prior to the actual product name There's nothing in the code that would allow that. It should be possible to insert the language anywhere in the code where a link is created though I've never tried it.  8 hours ago, radhavallabh said: Undefined index: QUERY_STRING That's strange. While none of the SERVER variables are guaranteed to be present, there is a standard that lists items that should be present and that is one of them. I can only think it is something specific to your server since it has never come up before. To prevent it, you can change this line $this->real_uri = ltrim( basename($_SERVER['SCRIPT_NAME']) . '?' . $_SERVER['QUERY_STRING'], '/' ); to this $this->real_uri = ltrim( basename($_SERVER['SCRIPT_NAME']) . ( isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : ''), '/' );  Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
radhavallabh Posted October 22, 2021 Share Posted October 22, 2021 13 hours ago, Jack_mcs said: There's nothing in the code that would allow that. It should be possible to insert the language anywhere in the code where a link is created though I've never tried it.  That's strange. While none of the SERVER variables are guaranteed to be present, there is a standard that lists items that should be present and that is one of them. I can only think it is something specific to your server since it has never come up before. To prevent it, you can change this line $this->real_uri = ltrim( basename($_SERVER['SCRIPT_NAME']) . '?' . $_SERVER['QUERY_STRING'], '/' ); to this $this->real_uri = ltrim( basename($_SERVER['SCRIPT_NAME']) . ( isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : ''), '/' );  Hi thank you for the reply dear; I used the code you gave and the error disappeared. But dear when I click the product link on shopping cart page it redirects to the index page instead; Please can you help me understand and fix the issue... Thank you so much in advance; Warm Regds./ radhavallabh Quote Link to comment Share on other sites More sharing options...
radhavallabh Posted October 22, 2021 Share Posted October 22, 2021 4 hours ago, radhavallabh said: Hi thank you for the reply dear; I used the code you gave and the error disappeared. But dear when I click the product link on shopping cart page it redirects to the index page instead; Please can you help me understand and fix the issue... Thank you so much in advance; Warm Regds./ radhavallabh Fixed it dear.. it was a curly braces issue from server. Quote Link to comment Share on other sites More sharing options...
radhavallabh Posted November 21, 2021 Share Posted November 21, 2021 Hi dear; It seems that it has stopped working on 1.0.8.7 any ideas what the issue may be??? Your help is deeply appreciated dear... Regds./ radhavallabh Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 21, 2021 Share Posted November 21, 2021 5 hours ago, radhavallabh said: It seems that it has stopped working on 1.0.8.7 Have you installed the latest version and applied the fix mentioned in this thread? Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
radhavallabh Posted November 22, 2021 Share Posted November 22, 2021 11 hours ago, Jack_mcs said: Have you installed the latest version and applied the fix mentioned in this thread? Yes dear I installed the latest version and updated the seo.class.php as well; It worked on 1.0.8.6 but ever since I updated to 1.0.8.7 the addon has stopped functioning dear. Your help and guidance shall be deeply appreciated dear; regds./ radhavallabh Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 22, 2021 Share Posted November 22, 2021 @radhavallabhIt is working here for that version and others has it working in their shops so it must be something in your installation. Maybe you overwrote the href_link.php file with the upgrade? If that isn't it, are you getting any errors? Do the settings show up in admin? Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
radhavallabh Posted November 23, 2021 Share Posted November 23, 2021 (edited) 16 hours ago, Jack_mcs said: @radhavallabhIt is working here for that version and others has it working in their shops so it must be something in your installation. Maybe you overwrote the href_link.php file with the upgrade? If that isn't it, are you getting any errors? Do the settings show up in admin? Hi dear; No I am using the same file as provided for the href_link.php, I just checked dear in most place the tep_href_link function has been replaced with $GLOBALS['Linker']->build ....... Is that the issue ?? I checked more thoroughly on the store for debugging.....the New Arrivals box on my Index page has the old code with tep_href_link function so those links are displaying the SEO URLS correctly... The Error console is not showing any error for now. Settings do show up in the admin properly. Please guide me on how to proceed; Regds./ radhavallabh Edited November 23, 2021 by radhavallabh Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 23, 2021 Share Posted November 23, 2021 12 hours ago, radhavallabh said: No I am using the same file as provided for the href_link.php, This is not clear to me. Are you using the file from the addon package or from the Phoenix package? I just compared a .87 shop I have it installed in with the files from the Phoenix package and they are the same, except for what this addon changes, and the urls are working fine in it so I can't think of any reason why it is failing for you. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
radhavallabh Posted November 25, 2021 Share Posted November 25, 2021 On 11/24/2021 at 12:40 AM, Jack_mcs said: This is not clear to me. Are you using the file from the addon package or from the Phoenix package? I just compared a .87 shop I have it installed in with the files from the Phoenix package and they are the same, except for what this addon changes, and the urls are working fine in it so I can't think of any reason why it is failing for you. Using the addon file dear.. but still am not able to understand why does my site fail to work... Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 25, 2021 Share Posted November 25, 2021 @radhavallabhSince it works in other shops but not yours, it must be something unique to yours. If you turn the addon off in admin do all of the urls work correctly? If it does, try using the Uninstall setting and then reload the shop side. Does that fix it? If not, try turning off all cache options in the settings and try again. If it still fails then the only thing I can think to do is to install it into a new, basic, shop. That should work since it works here. Then you can try it with your database and if it fails, then it is something there that is causing the problem.  radhavallabh 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
artfulweb Posted December 24, 2021 Share Posted December 24, 2021 On 11/25/2021 at 4:03 PM, Jack_mcs said: @radhavallabhSince it works in other shops but not yours, it must be something unique to yours. If you turn the addon off in admin do all of the urls work correctly? If it does, try using the Uninstall setting and then reload the shop side. Does that fix it? If not, try turning off all cache options in the settings and try again. If it still fails then the only thing I can think to do is to install it into a new, basic, shop. That should work since it works here. Then you can try it with your database and if it fails, then it is something there that is causing the problem.  Hello Jack and happy holidays, I too have the same problem. Tried it on a vanilla installation of Phoenix 1.0.8.7 as well as a modified version that already had it installed and working before upgrading to 1.0.8.7 and it does not rewrite. In my logs on both sites I am getting : =============  PHP Warning:  Cannot modify header information - headers already sent by (output started at /xxx/xx/xx/xx/templates/default/includes/components/template_top.php:26) in /xx/xx/xx/xx/includes/classes/seo.class.php on line 2908 PHP Warning:  Cannot modify header information - headers already sent by (output started at /xx/xx/xx/xx/templates/default/includes/components/template_top.php:26) in /xx/xx/xx/xx/includes/classes/seo.class.php on line 2910 ============= Have cleared all caches, rechecked my htacces file, uninstalled, reinstalled and still no rewrite. As the vanilla install has no modifications I just do not understand.  Thanks  Quote Link to comment Share on other sites More sharing options...
artfulweb Posted December 24, 2021 Share Posted December 24, 2021 OOOOOOHHHHH.... think I see the problem but do not know how to fix it. In the error it is calling template_top.php which existed prior to 1.0.8.6 headers already sent by (output started at /xx/xx/xx/xx/templates/default/includes/components/template_top.php:26) i whereas it is now templates/override/includes/componets/template.php so where is that called and how to modify it please? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 29, 2021 Share Posted December 29, 2021 @artfulwebI can see the failure in the latest version but don't have a fix at the moment. It is due, as I'm sure you know, to something being displayed before the code in question. So something must have changed in this version in the display or maybe php 8 is doing something different. I will look into it but I can't say when that will be. Regarding the template.php file, that is just present to  allow installing addons without changing the core code. It has been there for many versions so I don't think it is involved in the error. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
artfulweb Posted December 29, 2021 Share Posted December 29, 2021 Thanks Jack. Just for info I am not yet on php 8. Have a happy New Year! Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted December 29, 2021 Share Posted December 29, 2021 I wonder if $seo_urls isn't getting instantiated until the first call to href_link and that is now after the page output has started in template_top. Try editing catalog/includes/hooks/shop/siteWide/seoUrl.php and changing public function listen_injectinjectAppTop() { to public function listen_injectAppTop() { and see if that helps Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 30, 2021 Share Posted December 30, 2021 @BrockleyJohnGood catch. It appears they have removed injectinjectAppTop completely. @artfulwebIn the hook file change this line public function listen_injectinjectAppTop() { to this public function listen_injectSiteStart() { I made the change here and it ran without errors. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
artfulweb Posted December 31, 2021 Share Posted December 31, 2021 22 hours ago, Jack_mcs said: @BrockleyJohnGood catch. It appears they have removed injectinjectAppTop completely. @artfulwebIn the hook file change this line public function listen_injectinjectAppTop() { to this public function listen_injectSiteStart() { I made the change here and it ran without errors. Hi Jack, Made the change and still no change. Still getting the error PHP Warning:  Cannot modify header information - headers already sent by (output started at /XXX/XX/XX/XX/templates/default/includes/components/template_top.php:26) in /XX/XX/XX/X/includes/classes/seo.class.php on line 2908 and line 2910  Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 31, 2021 Share Posted December 31, 2021 1 hour ago, artfulweb said: /templates/default/includes/components/template_top.php:26) Please check that file to see that "injectSiteStart" is in it. You can try uninstalling this addon (using that setting) though I wouldn't think that would be needed. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
artfulweb Posted December 31, 2021 Share Posted December 31, 2021 3 hours ago, Jack_mcs said: Please check that file to see that "injectSiteStart" is in it. You can try uninstalling this addon (using that setting) though I wouldn't think that would be needed. Jack, there is no more template_top.php in 1.0.8.9, it is template.php. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 1, 2022 Share Posted January 1, 2022 13 hours ago, artfulweb said: Jack, there is no more template_top.php in 1.0.8.9, it is template.php. The template.php file is in templates/default/includes/ and templates/override/includes/. The templates_top.php file is in templates/default/includes/components/ and maybe templates/override/includes/components/. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
artfulweb Posted January 2, 2022 Share Posted January 2, 2022 On 12/31/2021 at 8:00 PM, Jack_mcs said: Please check that file to see that "injectSiteStart" is in it. You can try uninstalling this addon (using that setting) though I wouldn't think that would be needed. Found it and injectSiteStart is on line 36 of that file so why the problem? I am so perplexed. 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.