Rwe Posted December 2, 2019 Share Posted December 2, 2019 USU5. just noticed a problem with the write review URL's. when not logged in to my shop and trying to write a review , then after login the link to write a review should be : www.myshop.com/ext/modules/content/reviews/write.php in fact it redirects after login or after create a new account to : www.myshop.com/write.php (this returns a 404) when already logged in there is not a problem with the url. I suspect it has something to do with : "set php_self in the local scope" in application_top.php because when i set the old code back it works as it should. but my knowledge is limited on this.. anyone have some ideas how to fix this ? thanks Reinder Quote Link to comment Share on other sites More sharing options...
burt Posted December 2, 2019 Share Posted December 2, 2019 47 minutes ago, Rwe said: anyone have some ideas how to fix this Does the addon have the ability to by pass rewriting by using the old href_link. I remember that one or other of the rewriters allows you to utlise tep_original_href_link or something like that. I just don't remember which rewriter allows this. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 2, 2019 Share Posted December 2, 2019 14 minutes ago, burt said: Does the addon have the ability to by pass rewriting by using the old href_link. I remember that one or other of the rewriters allows you to utlise tep_original_href_link or something like that. I just don't remember which rewriter allows this. This one doesn't has it. It might be possible to add a specific rewrite rule to .htaccess for this page. It should be placed before the other USU5 rewrite rules. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Rwe Posted December 2, 2019 Share Posted December 2, 2019 54 minutes ago, raiwa said: It might be possible to add a specific rewrite rule to .htaccess for this page Does the url need to be rewriten? Once logged in and then clicking the link it just works with in the adress bar http://www.myshop.com/ext/modules/content/reviews/write.php?products_id=3 It is like something goes wrong with processing the href_link over the login page? Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 2, 2019 Share Posted December 2, 2019 38 minutes ago, Rwe said: Does the url need to be rewriten? Once logged in and then clicking the link it just works with in the adress bar http://www.myshop.com/ext/modules/content/reviews/write.php?products_id=3 It is like something goes wrong with processing the href_link over the login page? To rewrite the page is a fix for the problem. ULTIMATE SEO URLs suposes that all public direct accesible pages are in the root directory. Which is not the case anymore for the new write.php page Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Rwe Posted December 2, 2019 Share Posted December 2, 2019 2 minutes ago, raiwa said: To rewrite the page is a fix for the problem Okay i understand. I think this same issue will also affect write_pwa.php? ( addon purchase without account) . I cannot test this at the moment as the review link is in the order confirmation e-mail. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 2, 2019 Share Posted December 2, 2019 2 minutes ago, Rwe said: Okay i understand. I think this same issue will also affect write_pwa.php? ( addon purchase without account) . I cannot test this at the moment as the review link is in the order confirmation e-mail. Yes Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Rwe Posted December 3, 2019 Share Posted December 3, 2019 I fixed it with this: RewriteRule ^write.php$ ext/modules/content/reviews/write.php [NC,L,R] Placed just above the USU5 rewrite rules in .htaccess Or is there a better way? Thanks Reinder 12 hours ago, raiwa said: rewrite the page Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 3, 2019 Share Posted December 3, 2019 (edited) 4 hours ago, Rwe said: RewriteRule ^write.php$ ext/modules/content/reviews/write.php [NC,L,R] Looks fine 👍 Same for write_pwa.php ! Edited December 3, 2019 by raiwa Rwe 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
piernas Posted December 3, 2019 Share Posted December 3, 2019 17 hours ago, raiwa said: To rewrite the page is a fix for the problem. ULTIMATE SEO URLs suposes that all public direct accesible pages are in the root directory. Which is not the case anymore for the new write.php page I'm sorry I'm really busy these days. I'm not familiar with phoenix reviews - could you tell me how does it work? I cannot find the "write review" button to check how to add this to the addon. Where is it now? Quote Link to comment Share on other sites More sharing options...
burt Posted December 3, 2019 Share Posted December 3, 2019 This has been a problem for a very long time - try using the password reset functionality [which is in a module outside the base pages), going back as far as 2.3.3 (with this url rewriter installed). Put simply, the addon is broken (I reported it to Robert years ago) - rewrite rules is a band-aid not an actual fix. Quote Link to comment Share on other sites More sharing options...
piernas Posted December 3, 2019 Share Posted December 3, 2019 (edited) I know, I've had problems with AJAX requests to /ext not being processed by the addon before. It's a complex addon and will take time for me to fix and test the issue but it's necessary for people like me with hundreds of already search engines indexed products and multilingual shops. Will try to find a better solution - if I'm able to fix it. Edited December 3, 2019 by piernas Quote Link to comment Share on other sites More sharing options...
thierryc Posted December 3, 2019 Share Posted December 3, 2019 (edited) Hello since i installed usu5 i have the following errors, when i want to create a category or product if you can help me find the mistake thanks in advance [03-Dec-2019 18:37:19 Europe/Paris] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/****/****/includes/hooks/admin/categories/USU5.php:37) echo $path_to_cache; $it = new DirectoryIterator( $path_to_cache ); while( $it->valid() ) { in /home/******/*****/admin/includes/functions/general.php on line 38 38 39 if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page 40 if (substr($url, 0, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)) == HTTP_SERVER . DIR_WS_HTTP_CATALOG) { // NONSSL url [03-Dec-2019 18:37:27 Europe/Paris] PHP Warning: Use of undefined constant USE_CACHE - assumed 'USE_CACHE' (this will throw an Error in a future version of PHP) in /home/*******/*******/admin/includes/functions/general.php on line 943 942 if (is_array($params) && (sizeof($params) > 0)) { 943 $attributes_check = true; 944 $attributes_ids = ''; Edited December 3, 2019 by thierryc Quote Link to comment Share on other sites More sharing options...
thierryc Posted December 4, 2019 Share Posted December 4, 2019 Hello I'm resting the message because I put the wrong general file, I put the catalog and not the admin here is the good thank you Hello since i installed usu5 i have the following errors, when i want to create a category or product if you can help me find the mistake thanks in advance [03-Dec-2019 18:37:19 Europe/Paris] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/****/****/includes/hooks/admin/categories/USU5.php:37) echo $path_to_cache; $it = new DirectoryIterator( $path_to_cache ); while( $it->valid() ) { in /home/******/*****/admin/includes/functions/general.php on line 38 38 header('Location: ' . $url); if (STORE_PAGE_PARSE_TIME == 'true') { if (!is_object($logger)) $logger = new logger; $logger->timer_stop(); } [03-Dec-2019 18:37:27 Europe/Paris] PHP Warning: Use of undefined constant USE_CACHE - assumed 'USE_CACHE' (this will throw an Error in a future version of PHP) in /home/*******/*******/admin/includes/functions/general.php on line 943 if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); Quote Link to comment Share on other sites More sharing options...
thierryc Posted December 12, 2019 Share Posted December 12, 2019 Hello I'm still looking for the problem even after the style error check, I can not find the problem if I delete USU5.Php, more problems adding category or article are working properly with USU5.Php, I have the error message, and as soon as I go back it still created the category or article If you have an idea, I'm interested bye thierry Quote Link to comment Share on other sites More sharing options...
♥ecartz Posted December 12, 2019 Share Posted December 12, 2019 On 12/4/2019 at 7:22 AM, thierryc said: Use of undefined constant USE_CACHE This is telling you that the USE_CACHE constant has not been defined but the code is trying to access it. This can happen if you try to install an App with an old copy of the file in a newer version of the store. For example, if you copied the includes/functions/general.php from the App and tried to install it in a Phoenix 1.0.4.0 store. Another possibility is that the code if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } is part of the code that the App had you add. If so, delete the entire block as was done in this change: https://github.com/gburton/CE-Phoenix/commit/880761995f11435e4909a3aa734b0b4ee1f4ba4c#diff-54d4643a07e7e83ca01aafaf92ac8fc3 Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
thierryc Posted December 13, 2019 Share Posted December 13, 2019 (edited) Hello thanks for the help, my files are already modified I redid a complete installation, the last message disappeared on the other hand I have the other two 03-Dec-2019 18:37:19 Europe / Paris] Avertissement PHP: ne peut pas modifier les informations d'en-tête - en-têtes déjà envoyés par (sortie démarrée dans / home / **** / **** / includes / hooks / admin / categories / USU5.php: 37) echo $path_to_cache; $it = new DirectoryIterator( $path_to_cache ); while( $it->valid() ) { dans /home/******/*****/admin/includes/functions/general.php à la ligne 38 38 header('Location: ' . $url); if (STORE_PAGE_PARSE_TIME == 'true') { if (!is_object($logger)) $logger = new logger; $logger->timer_stop(); } Edited December 13, 2019 by thierryc Quote Link to comment Share on other sites More sharing options...
♥ecartz Posted December 13, 2019 Share Posted December 13, 2019 My guess would be that echo $path_to_cache; is not supposed to be there. If you comment it out or delete it, do both errors go away? //echo $path_to_cache; Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
thierryc Posted December 13, 2019 Share Posted December 13, 2019 yes no more error message Quote Link to comment Share on other sites More sharing options...
♥DAVID3733 Posted December 17, 2019 Share Posted December 17, 2019 Hello Does anybody have URLS 5 Pro working (rewrite) using httpd.conf rather than .htaccess, I want to move over to zero .htaccess files but think this is stopping me Thank you David Quote David Link to comment Share on other sites More sharing options...
ArtcoInc Posted December 17, 2019 Share Posted December 17, 2019 @DAVID3733 IIRC, any changes to httpd.conf requires a restart of Apache. Is this something you really want to do in a production environment, especially if you are on a shared server? M Quote Link to comment Share on other sites More sharing options...
♥DAVID3733 Posted December 17, 2019 Share Posted December 17, 2019 Fully aware of this, I have a number of reasons, mainly because of speed and its my server main htaccess file takes me longer to upload than restarting Apache, both knock the website out so not a consideration Quote David Link to comment Share on other sites More sharing options...
yahalimu Posted December 18, 2019 Share Posted December 18, 2019 Thank you Piernas, great work. I installed on a new Phoenix 1.0.4 and it worked first time. My new site now has exactly the same URL's as the old. (I use rewrite but I have cache switched off) I noticed the directory structure for the compare files directory in the install instructions has a slight error though. (The functions directory is of course inside includes not in catalog) Would be good to hook the two altered core files in next version but not sure if this is currently possible. Thanks again. Quote Link to comment Share on other sites More sharing options...
yahalimu Posted December 18, 2019 Share Posted December 18, 2019 (edited) Having said that, I have attempted to insert the rewrite rule: RewriteRule ^write.php$ ext/modules/content/reviews/write.php [NC,L,R] in htaccess but I get a server error. I tried inserting just after 'RewriteBase /' and before the other rules but no joy. ***EDIT Please ignore, sorted, seems to work fine without the rewrite in my config Edited December 18, 2019 by yahalimu Quote Link to comment Share on other sites More sharing options...
♥DAVID3733 Posted December 21, 2019 Share Posted December 21, 2019 On 12/17/2019 at 8:41 PM, DAVID3733 said: Hello Does anybody have URLS 5 Pro working (rewrite) using httpd.conf rather than .htaccess, I want to move over to zero .htaccess files but think this is stopping me Thank you David Can confirm with a bit of jiggling it will work in httpd.conf had to change RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+)\.html$ index.php? [NC,L,QSA] to RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+)\.html$ /index.php?cPath=$2 [NC,L,QSA] although have problem with popup image not working now, not sure if that related though to URLS5 Quote David 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.