Update results in near empty homepage and other trouble
I tried to update my Prestools webshop to TB. Luckily i worked on a localhost copy. The update itself went without problems. I chose to use the new TB theme.
But when i was finished and I looked in the backoffice at the themes, there was only one theme - the Prestashop default theme - and that was set as my default theme. At the front side things were even worse. The home page displays only my logo and a black bar. When I switched MOV-DEV on I don’t see any errors. And when I look at the source code it is very short, but it correctly ends with a html end tag.
The page of a subcategory was just as problematic. I got an error message indicating that it was trying to open index.php in the root. (I have different software in the root and the error message I got war clearly generated by that software) But as this shop is located in a subdirectory it shouldn’t try to do anything in the root.
![alt text]( image url)
Hey, what version of PrestaShop were you on? Do you know if you had any overrides or custom code hard coded in your shop?
188.8.131.52. The only non-Prestashop module is Michael’s Stripe module. And Cart.php has been adapted.
No error messages in the TB log directory or in the PHP errorlog?
If you compare the pre-update root directory to the post-update (you claim this root directory shouldn’t be touched), was anything still changed, like the .htaccess file?
Don’t know what the problem is, just trying to figure it out…
The root .htaccess is not changed. Nor any other file. The way that see that it opens the root index file is the error message:
Warning: require_once(…/thetexts.php): failed to open stream: No such file or directory in C:\xs4ampp\htdocs\index.php on line 6
I have one error in the TB log file that is repeated twice:
ERROR 2017/03/19 - 12:38:08: Shop not found at line 404 in file classes/shop/Shop.php
ERROR 2017/03/19 - 12:44:06: Shop not found at line 404 in file classes/shop/Shop.php
This is NOT a multishop shop.
thetexts.phpisn’t a file coming with either PS or 30bz. Has to be some custom code. Failure to load this file causes an exception, which in turn prohibits running all the code after this line. Which means: almost nothing works.
Solution is to either return file
Shop.phpto its original state or to place
thetexts.phpwhere it’s expected.
This is NOT a multishop shop.
Much of the PHP code treats a monoshop like a multishop with just one shop defined.
"thetexts.php isn’t a file coming with either PS or 30bz"
As I said: this index.php file in the root does not belong to PS or TB. The shop is in a subdirectory. So the problem is that TB is somehow including this file.
"Solution is to either return file Shop.php to its original state"
As I said the only file that is changed outside the template is Cart.php. So Shop.php was not changed
The shop is in a subdirectory. So the problem is that TB is somehow including this file.
Good point. I think I got it now.
Can you look into Back Office -> Preferences -> SEO & URLs and verify whether the ‘Base URI’ field is set correctly? If yes, there’s apparently some code not respecting this field.
SEO&URL’s is correct.
Below you find the full html of my frontpage - from the body tag downwards (I have removed empty lines):
<body id=“index” class=“index hide-left-column hide-right-column lang_en”>
<nav class=“navbar navbar-inverse”>
<button type=“button” class=“navbar-toggle collapsed” data-toggle=“collapse” data-target="#header-navbar" aria-expanded=“false”>
<span class=“sr-only”>Toggle navigation</span>
<a class=“navbar-brand” href=“http://localhost/_prestoolz/”>Prestools - The Prestashop tools shop</a>
<div class=“collapse navbar-collapse” id=“header-navbar”>
<div id=“header-blocks” class=“container”>
<div id=“shop-logo” class=“col-sm-4”>
<a href=“http://localhost/_prestoolz/” title=“Prestools - The Prestashop tools shop”>
<img class=“img-responsive center-block” src=“http://localhost/_prestoolz/img/logo.jpg” alt=“Prestools - The Prestashop tools shop” width=“350” height=“99”/>
<div id=“columns” class=“container”>
<main id=“center_column” class=“col-xs-12 col-sm-12”>
It’s apparently a bug. Noted here: https://github.com/thirtybees/thirtybees/issues/217
Next step is to find a distinction these installations where the bug appears and those where it doesn’t. Goal is to find a way to reproduce this bug on a developers computer. If it can’t be reproduced it can’t be fixed.
What is your operating system and server software? Mac OS with its built in Apache, perhaps? And sorry for all these questions, so far I’m stepping in the dark.
Can I add that I saw the exact same problem as musicmaster when migrating from PrestaShop 184.108.40.206. I had a completely borked front end and only the PrestaShop default theme in the backend, the TB theme was a big ‘?’ and I couldn’t click it. I managed to resolve the front-end by clearing my cache manually via FTP as the standard cache clearing methods didn’t work. I still didn’t get the TB theme though in the back end and my dev site therefore is running using the default PrestaShop theme.
I wasn’t in dev mode but I was in maintenance mode. All the checks said OK. The only three third party modules I had installed were a caching module, sagepay payment gateway and a one page checkout. I also had custom code changes. My dev site runs on a linux shared server with Apache, php 5.6 and MySQL. It’s installed in a sub-directory as well.
I can’t confirm any of the index.php issues though, just the same broken front end / no theme backend.
I had a completely borked
Borked as in empty? What do the override and non-native modules settings look like on the BO page “Advanced Parameters > Performance” ?
Sorry, yes borked as in the same as musicmaster. It’s an English term mean badly broken
I had all of those settings set to No.
@Traumflug I am working on a Windows 10 computer. I haven’t tried it yet but I would expect that the problem can be reproduced with
- a Windows 10 computer with Xampp (=mariadb)
- a fresh PS 220.127.116.11 webshop in a subdirectory of the localhost root.
- choosing for the new theme when the option is given during the upgrade
I did a little more research on why the new community theme didn’t show in my backoffice. My converted shop has both themes as subdirectories below the themes directory. So I checked the community theme and compared it with a fresh TB installation. I noticed that two directories (cache and pdf) were missing. However, adding those directories (by copying them from the fresh TB installation) did not fix the problem. I also checked the database, but I couldn’t find any problem in the ps_shop* and ps_theme* tables. Except for the fact of course, that in the database the shop is assigned to the community theme but that in the backoffice the community theme doesn’t exist and the shop is assigned to the default theme.
A little more research: if I copy the full community theme from a fresh TB install it does show up in the backoffice. However, it still shows with a missing image. And my front page remains as empty as it was before - even after a cache cleaning.
It is a pity that I cannot place images or file attachments here. You need that for bug reports.
You can’t place images only when you use quick reply. Otherwise I think you can. At least I uploaded more than once.