gr4devel Posted June 10, 2013 Share Posted June 10, 2013 Hi community! The problem: I enabled the URL rewriting and all of a sudden I can't access the new-products page nor the login page. Here's the errors: Warning: File /var/apps/legacydistribution/current/my-account.php is deprecated in /var/apps/legacydistribution/current/classes/Tools.php on line 1845 Warning: Cannot modify header information - headers already sent by (output started at /var/apps/legacydistribution/current/classes/Tools.php:1845) in /var/apps/legacydistribution/current/classes/Tools.php on line 105 Warning: Cannot modify header information - headers already sent by (output started at /var/apps/legacydistribution/current/classes/Tools.php:1845) in /var/apps/legacydistribution/current/classes/Tools.php on line 108 I tried to debug but without success. Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 it's because in new prestashop urls like http://shop(dot)com/my-account.php & http://shop(dot)com/new-products.php etc. arent work well. I think that this is issue related to TEMPLATE you use. Theme uses old method to link to the pages like i mentioned above. where you've got link to the "my-account.php" page ? and if it is possible - please paste here the source of tpl file where you've got this link. Link to comment Share on other sites More sharing options...
gr4devel Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) As always let me show you all my gratitude! I briefly look at the template code but I can't see nothing wrong with it. I think it conforms itself to the 1.5 PS standards. However here's all the template code: {* * 2007-2013 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2013 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} <!-- MODULE Block new products --> <div id="new-products_block_right" class="block products_block"> <h4 class="title_block"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blocknewproducts'}">{l s='New products' mod='blocknewproducts'}</a></h4> <div class="block_content"> {if $new_products !== false} <ul class="product_images clearfix"> {foreach from=$new_products item='product' name='newProducts'} {if $smarty.foreach.newProducts.index < 2} <li{if $smarty.foreach.newProducts.first} class="first"{/if}><a href="{$product.link}" title="{$product.legend|escape:html:'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'medium_default')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$product.legend|escape:html:'UTF-8'}" /></a></li> {/if} {/foreach} </ul> <dl class="products"> {foreach from=$new_products item=newproduct name=myLoop} <dt class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$newproduct.link}" title="{$newproduct.name|escape:html:'UTF-8'}">{$newproduct.name|strip_tags|escape:html:'UTF-8'}</a></dt> {if $newproduct.description_short}<dd class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$newproduct.link}">{$newproduct.description_short|strip_tags:'UTF-8'|truncate:75:'...'}</a><br /><a href="{$newproduct.link}" class="lnk_more">{l s='Read more' mod='blocknewproducts'}</a></dd>{/if} {/foreach} </dl> <p><a href="{$link->getPageLink('new-products')}" title="{l s='All new products' mod='blocknewproducts'}" class="button_large">» {l s='All new products' mod='blocknewproducts'}</a></p> {else} <p>» {l s='Do not allow new products at this time.' mod='blocknewproducts'}</p> {/if} </div> </div> <!-- /MODULE Block new products --> Edited June 10, 2013 by gr4devel (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 hmm there is no my-account.php link i think that the probem is related to the footer section / block user info where the urls to my-account pages appear Link to comment Share on other sites More sharing options...
gr4devel Posted June 10, 2013 Author Share Posted June 10, 2013 Sorry actually the problem that I reported appears in many different sections. One of these is the new products tpl. Sorry . Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 for example - on homepage you've got this error too? Link to comment Share on other sites More sharing options...
gr4devel Posted June 10, 2013 Author Share Posted June 10, 2013 Sorry for my lateness. Actually when I load the homepage everything works fine. I only get this error when I try to enter the new products page. Link to comment Share on other sites More sharing options...
gr4devel Posted June 10, 2013 Author Share Posted June 10, 2013 Damn, now, running locally, I get a redirect error. The classic infinite loop . Link to comment Share on other sites More sharing options...
gr4devel Posted June 11, 2013 Author Share Posted June 11, 2013 (edited) Maybe it's all about .htaccess... Unfortunately I'm not particularly shod on it and I think I need some help to fix the problem if it resides in the redirections. Edited June 11, 2013 by gr4devel (see edit history) Link to comment Share on other sites More sharing options...
gr4devel Posted June 11, 2013 Author Share Posted June 11, 2013 (edited) I found that the error was related to the fact that I disabled the English language. However if I enable it in the BO I get my domain followed by the default language isocode. Isn't it possible to have only one language without the iso code postfix?! P.S: can someone shed light on how the redirections works in PS? Edited June 11, 2013 by gr4devel (see edit history) Link to comment Share on other sites More sharing options...
gr4devel Posted June 12, 2013 Author Share Posted June 12, 2013 Ok I fixed it but I think there's still something that isn't working as it should. Indeed if I have a friendly name that is the same as the name of the controller (I mean the php script that invoke the controller that handles the page, e.g. new-products -> new-products.php) and I enable only one language for the shop I get an endless loop (net:error I mean). So my fix was simply to change the friendly url into something else than the name of the related php file. However I think that there's something wrong with the Dispatcher. Should I mark the topic as [sOLVED]? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now