jan.pesek Posted January 7, 2014 Share Posted January 7, 2014 Hi, I have a problem with displaying combinations tab in product details in back office of Presta Shop 1.5.6.0 (recently upgraded from 1.3), seems to have some sort of javascript error (see details below). Description of the problem: when I go to product details, I can view/edit all tabs except "Combinations" tab - when I click Combinations, I get stuck either with blank grey page or (more often) with the loading animation (spinning arrows forever). It's not possible to click on other section to go back after that, you have to reload the page to display e.g. "Information" tab again. It happens on multiple browsers and multiple computers/operation systems. What I know about the problem so far: - it does happen even when adding new product (it does display info that you have to save product first correctly though, after you save product with only it's name filled, you immediately cannot acces the combinations tab) - page is loaded via ajax correctly - request to "http://mysite.example.com/shoptest4/admin32/index.php?controller=AdminProducts&token=11296268abd6481986d2edc0c3acad1e&id_product=761&action=Combinations&updateproduct&ajax=1&rand=1389126637902" returns 200 OK, and if I put this addres into the browser manually, it seems to work correctly: - FireBug reports following bug when opening the product detail page: SyntaxError: syntax errorhttp://mysite.example.com/shoptest4/js/jquery/jquery-1.7.2.min.jsLine 2 The piece of code it displays along with the error is "attrs[] = new Array(0, ..." - Apache adds into the error log following message everytime I visit product detail page: [Tue Jan 07 21:37:21 2014] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 39614 to 10768 : URL /shoptest4/admin32/index.php, referer: http://mysite.example.com/shoptest4/admin32/index.php?controller=AdminProducts&id_product=761&updateproduct&token=11296268abd6481986d2edc0c3acad1e Not sure if this is related. - It has the same behaviour both in online version at my hosting and on my localhost - I haven't found any other errors - it does not display anything in the browser (I have debug mode set to true), and in /shoptest4/log there is nothing (nothing unusual in Advanced parameters -> Log either) I've tried upgrading to jQuery 1.10.2, but it didn't help. Then I tried to copy & replace complete /js folder in shop root from clean install, but it didn't help either, I also tried to copy whole /admin folder from clean install, but that didn't help either. I tried to summarize as much information about the problem as possible, if there is something else, just ask and I'll add requested information asap. Not really sure what should I try next, so I'll be grateful for any suggestions about what may be causing the problems/what should I do to fix it. Thanks, Jan Link to comment Share on other sites More sharing options...
jan.pesek Posted January 9, 2014 Author Share Posted January 9, 2014 Solution: Turned out the problem was in data in the database - one of the attribute names in table ps_attribute_lang had break at the end. Maybe it might not have been exactly break, not sure why break would cause problems, but phpmyadmin displayed it as a break. Seems prestashop is loading all the attributes in the "attrs" array, and due to this weird ending character, it somehow corrupted the array which resulted in a strange behaviour. Link to comment Share on other sites More sharing options...
Recommended Posts