glennlawre Posted April 8, 2013 Share Posted April 8, 2013 (edited) I may have posted this in the wrong forum previously, so here goes in this one... I have updated my site from 1.4.8 to 1.5.4 using the 1-click upgrade module. It worked quite well, except for all the custom mods I had to re-do! But anyway, my wishlist module does not seem to be working correctly after the upgrade. The styling doesn't seem to be getting applied to the "My Wishlists" page. This is how my new wishlist page looks But this is how it should look Can anyone advise why this might be? Thanks in advance... Edited April 9, 2013 by glennlawre (see edit history) Link to comment Share on other sites More sharing options...
glennlawre Posted April 8, 2013 Author Share Posted April 8, 2013 I have just realized that my global.css is not getting applied to my Wishlist page, this is what is causing my issue! If I edit the source html and add a link to my global.css the page looks correct. Can anyone tell my why my global.css might not be getting applied to this page and maybe how to resolve this? Thanks... Link to comment Share on other sites More sharing options...
glennlawre Posted April 9, 2013 Author Share Posted April 9, 2013 Surely someone has to know why my style sheet is not getting called to the blockwishlist module... Or even a work-around make it apply. Any help please??? Link to comment Share on other sites More sharing options...
vekia Posted April 9, 2013 Share Posted April 9, 2013 can you show me how the url looks like? (for my wishlist page) Link to comment Share on other sites More sharing options...
glennlawre Posted April 9, 2013 Author Share Posted April 9, 2013 This is the url - http://test25.net/clasp/modules/blockwishlist/mywishlist.php Tks Link to comment Share on other sites More sharing options...
glennlawre Posted April 9, 2013 Author Share Posted April 9, 2013 I think this may be got to do with an issue from my theme. Can anyone advise of a way to force global.css to apply to "/modules/blockwishlist/mywishlist.php" Link to comment Share on other sites More sharing options...
prestamax Posted April 10, 2013 Share Posted April 10, 2013 (edited) You are not alone. I am having the same issue with a module generated page since PS1.5.4 and another user reportet this error too http://www.prestasho...96#entry1170296 Everything worked fine in 1.5.3.1 so it must have something to do with the upgrade. The other user (see the link) has an error message about a deprecated header function. I am not getting this error but the header most likely plays a role since it usually is including the css. Edited April 10, 2013 by prestamax (see edit history) Link to comment Share on other sites More sharing options...
glennlawre Posted April 10, 2013 Author Share Posted April 10, 2013 (edited) Isn't there a way to force css files to be called for all pages? I seem to remember reading somewhere before to do this via an override maybe. Anyone? Edited April 10, 2013 by glennlawre (see edit history) Link to comment Share on other sites More sharing options...
Whispar1 Posted April 10, 2013 Share Posted April 10, 2013 Someone please correct me if I am wrong but the wishlist is technically a cms page yes? If so, you can call the css file in CMScontroller.php The code will look something like this: public function setMedia() { parent::setMedia(); if ($this->assignCase == 1) $this->addJS(_THEME_JS_DIR_.'cms.js'); $this->addJS(_THEME_JS_DIR_.'jquery-1.3.2.js'); $this->addCSS(_THEME_CSS_DIR_.'cms.css'); $this->addCSS(_THEME_CSS_DIR_.'global.css'); } I had to do this to call some custom css and js for an image gallery this way. Create a backup of the file before changing - just in case you do not get the desired results. Link to comment Share on other sites More sharing options...
glennlawre Posted April 11, 2013 Author Share Posted April 11, 2013 These steps do indeed help to call a css file for cms pages, however I don't think the "mywishlist" page is a cms page as it did not call the files still. Is there another .php file that this code can be added to for calling the css sheet? I have tried to add it to ./modules/blockwishlist/mywishlist.php but the page just errors out. Cheers... Link to comment Share on other sites More sharing options...
lucie62140 Posted April 11, 2013 Share Posted April 11, 2013 Hello, I have the same error, i don't know why. I have updated my site from 1.4.7.3 to 1.5.4 using the 1-click upgrade module. Link to comment Share on other sites More sharing options...
glennlawre Posted April 12, 2013 Author Share Posted April 12, 2013 Anyone know why this is? Or maybe someone can advise how to overcome the issue by forcing global.css to be applied to the mywishlist.php page? Link to comment Share on other sites More sharing options...
Whispar1 Posted April 12, 2013 Share Posted April 12, 2013 I have not tested this but the controller for mywishlist is located in modules/blockwishlist/controllers/front/mywishlist.php You can try adding the lines I listed above something like: public function setMedia() { parent::setMedia(); if ($this->assignCase == 1) $this->addCSS(_THEME_CSS_DIR_.'global.css'); } Again, backup mywishlist.php first in case you get what you got the last time so you can replace with a fresh copy. I don't know if this is the most efficient way to call it but if it works then I guess it doesn't matter Link to comment Share on other sites More sharing options...
glennlawre Posted April 12, 2013 Author Share Posted April 12, 2013 I have not tested this but the controller for mywishlist is located in modules/blockwishlist/controllers/front/mywishlist.php No luck I'm afraid, I have added this control to "modules/blockwishlist/controllers/front/mywishlist.php" and reloaded the page but it is still not calling global.css :( Link to comment Share on other sites More sharing options...
Whispar1 Posted April 12, 2013 Share Posted April 12, 2013 Take a look at this - similar issue with a link to a fix. Hopefully it helps with the wishlist page. http://forge.prestashop.com/browse/PSCFV-8565 Fix https://github.com/PrestaShop/PrestaShop/commit/5642ffb8ee5cf950b0b821db90a654f23cad7bde 3 Link to comment Share on other sites More sharing options...
glennlawre Posted April 12, 2013 Author Share Posted April 12, 2013 This resolved my issue... Modifying my header.php so it looks like the below has added the call to the required css sheets. This may add some additional load to my site as all the media will probably be loaded now for every page, but this seems to be the only fix for this for now. Thank you so much for helping with this Whispar1...! if (isset(Context::getContext()->controller)) $controller = Context::getContext()->controller; else { $controller = new FrontController(); $controller->init(); $controller->setMedia(); } Tools::displayFileAsDeprecated(); $controller->displayHeader(); Link to comment Share on other sites More sharing options...
Whispar1 Posted April 12, 2013 Share Posted April 12, 2013 Glad it is working! You can delete the Joe Doe customer I made to check out the page. Link to comment Share on other sites More sharing options...
Stanciu Valentin Posted April 24, 2013 Share Posted April 24, 2013 this also worked for me, just that i needed to edit init.php file Link to comment Share on other sites More sharing options...
irishfighter Posted April 26, 2013 Share Posted April 26, 2013 Worked like a charm... Cheers! Link to comment Share on other sites More sharing options...
iticleonel.len Posted June 16, 2013 Share Posted June 16, 2013 This resolved my issue... Modifying my header.php so it looks like the below has added the call to the required css sheets. This may add some additional load to my site as all the media will probably be loaded now for every page, but this seems to be the only fix for this for now. Thank you so much for helping with this Whispar1...! if (isset(Context::getContext()->controller)) $controller = Context::getContext()->controller; else { $controller = new FrontController(); $controller->init(); $controller->setMedia(); } Tools::displayFileAsDeprecated(); $controller->displayHeader(); I hav eprestashop 1.5.4.1 and i have the same ploblem, i change that but no works Link to comment Share on other sites More sharing options...
DD_DD Posted June 21, 2013 Share Posted June 21, 2013 I hav eprestashop 1.5.4.1 and i have the same ploblem, i change that but no works Please try to insert the line $this->setMedia(); at the end of the init() function located in /classes/FrontController.php (exemple below) $this->iso = $iso; $this->setMedia(); $this->context->cart = $cart; $this->context->currency = $currency; } and remove it from header.php, like it was in 1.5.3 Link to comment Share on other sites More sharing options...
luciep Posted November 20, 2013 Share Posted November 20, 2013 Take a look at this - similar issue with a link to a fix. Hopefully it helps with the wishlist page. http://forge.prestashop.com/browse/PSCFV-8565 Fix https://github.com/PrestaShop/PrestaShop/commit/5642ffb8ee5cf950b0b821db90a654f23cad7bde It works for me ! Thank you 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