Jump to content

Error with upgrade - cannot login to admin or see the shop


Recommended Posts

I copied the site from http://www.vaporsolutions.gr/ to http://www.vaporsolutions.gr/newsite/

 

in order to perform an update without tampering the live site.

 

However, I cannot see the site located at /newsite or access the admin.

 

When I type (for admin) the path, I get:

http://www.vaporsolutions.gr/newsite/admingeorge2/index.php?controller=AdminLogin&token=5a3c7230eb2670b616500e206b34bd07&redirect=AdminHome

and a blank page.

 

At: http://www.vaporsolutions.gr/newsite/ I see the message: Oops, something went wrong. Try to refresh this page or feel free to contact us if the problem persists."

 

I changed the settings file to: define('__PS_BASE_URI__', '/newsite/');

and inserted the dbase name/user/pwd (I made a new dbase and imported the exported sql file from the master site with success).

 

My htaccess hasn't changed (is the same as from the master site) and I have not edited that at all so far.

 

What is the solution? Why am I getting this?

 

I have updated the files with the 1.5.5.0 version. I had the 1.4.7.3

Link to comment
Share on other sites

The problem persists. The table shop_url doesnt exist either in the master dbase or in this new one (which is a copy of the master dbase).

It seems like this is blocking both admin and front-end access.

 

any ideas/solutions?

 

See the errors here:

 

http://www.vaporsolutions.gr/newsite/

Edited by channeld (see edit history)
Link to comment
Share on other sites

The problem persists. The table shop_url doesnt exist either in the master dbase or in this new one (which is a copy of the master dbase).

It seems like this is blocking both admin and front-end access.

 

any ideas/solutions?

 

See the errors here:

 

http://www.vaporsolutions.gr/newsite/

forgoten password works (but old passwords for registered users)

Link to comment
Share on other sites

this is proper way to turn on error reporting: 

 

open config/defines.inc.php

 

find this line

define('_PS_MODE_DEV_', false);

change to look like this:

define('_PS_MODE_DEV_', true);

 

Warning: Function addCSS() is deprecated in /www/kornelv.com/www/root/modules/econt/econt.php on line 492

in /www/kornelv.com/www/root/classes/Tools.php on line 1953

 

Warning: Cannot modify header information - headers already sent by (output started at /www/kornelv.com/www/root/classes/Tools.php:1953) in/www/kornelv.com/www/root/classes/exception/PrestaShopException.php on line 37

[PrestaShopDatabaseException]

Unknown column 'id_employee' in 'field list'

 

INSERT INTO `ps_log` (`severity`, `error_code`, `message`, `object_id`, `id_employee`, `object_type`, `date_add`, `date_upd`) VALUES ('3', '0', 'The function addCSS (Line 492) is deprecated and will be removed in the next major version.', '0', '1', '', '2013-09-04 15:05:18', '2013-09-04 15:05:18')

at line 613 in file classes/db/Db.php

 

607.             WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);

608.         }

609.         else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))

610.         {

611.             if ($sql)

612.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

613.             throw new PrestaShopDatabaseException($this->getMsgError());

614.         }

615.     }

616.

617.     /**

How to stop this module econt (carrier in Bulgaria)? To stop error reporting?

Link to comment
Share on other sites

  • 3 weeks later...

We've got the same problem with a clean installation for a v1.5.4.1 and later upgrade to v1.5.5.0.


 


Okay user @vekia, we already reached the same conclusion: the table ps_log lacks a column named id_employee.


 


For the outrageous users afflicted by this issue the real question could be: ¿How is this possible? How to distribute and upgrade a component code for a SQL Schema that has not yet been released. This apparently is a very serious problem on the team use of a source-code-control-subsystem for the product.


 


But my question is: ¿Which is the proposed solution? I expect an answer by an official Prestashop Moderator, not any user.


- If there is one solution or workaround published, ¿can you add an internet link (URL) to it within this forum's thread?


- If there is no offical answer, ¿when it will be? More than two weeks passed already.


 


In my humble opinion a patch should be release, a SQL file, or a document with specific technical details on how to proceed to fix this problem. A simple sentence indicating “add the missing column” is insufficient. An SQL file should be attached to see the column type, details, constraints, foreign keys, etc. The document should also provide a comment indicating that there is nothing else missing. Because with a code-control-system you can see that only that “change was missing”, those in charge can see the change history. And it should not take 15 days to look into it.


 


By the way, to us adding a VARCHAR column was enough to fix this bug and also another very-severe-bug caused due to this log-insert-failure fatal-error.


Link to comment
Share on other sites

hello jordfis,

 

 

 

How to distribute and upgrade a component code for a SQL Schema that has not yet been released

Upgrade script has got mySQL query to ALTER ps_log table. This query adds necessary columns (in this case id_employee).

So, by default update should create this column and everything should works well. The question in this case is: why update did not create it? well, it might be related, for example, to your mysql USERNAME permissions, maybe it isn't allowed to ALTER tables? (it's common configuration of mysql, it's for safety purposes). There are many possibilities not related to prestashop core - but to the server side cases (especially configuration).

 

This is my opinion about it, waiting for opinion from my colleagues

Link to comment
Share on other sites

Hello all,

 

   This is not a common upgrade problem and most likely related to server side issues like permissions as vekia stated. If it is a bug we would need a way to reproduce it. At this time, there is no way to reproduce it. It seems to only be a problem with a couple of users and this is usually fixed by configuring permissions correctly. 

 

If we are given more information on how to reproduce, we would be better able to investigate and solve any issue. 

Link to comment
Share on other sites

@Benjamin, this is a rather common problem. The first time I got was when I foolishly believed the claims by some people that the database hadn't been changed from 1.5.4.1 to 1.5.5. The second time was with a regular upgrade from 1.4.9 that also had other problems. Interestingly the second time it disappeared when I repaired (so I hope) an "addccs() is deprecated" warning. So it may only appear if errors have to be logged.

 

For those wanting to insert the id_employee field:

it comes after object_id, it is an int of length 10 and the default value is null. 

Edited by musicmaster (see edit history)
  • Like 1
Link to comment
Share on other sites

I update you with details about my research.

 

(1) PrestashopTeam consideration about database user access rights

Point taken. Nonetheless your consideration is wrong, at least in my scenario. I do not perform trickery using several users to access the same database-schema. Only one user exists for one database and in my case it is one configured on prestashop php settings file, and also used to restore the entire database (create all tables).

It makes me suspicious several users having the exact same problem due to the same mistake (amateurish). If the root cause was access rights I guess other users would point out it already as the solution.

 

(2) My research on database schema changes

I searched files to look into the SQL ALTER TABLE details. I found the SQL update file:

prestashop/admin4763/autoupgrade/latest/prestashop/install/upgrade/sql$ cat 1.5.5.0.sql

I did check for changes. None of them is present. I manually edited the SQL content and updated the schema step by step.

It is disturbing that I've detected even more problems. The following queries fail:

UPDATE `PREFIX_tab` SET id_parent = @id_parent WHERE `id_parent` = 1 AND `class_name` = 'AdminMarketing' LIMIT 1;

UPDATE `PREFIX_hook` SET `live_edit` = '1' WHERE `name` LIKE 'leftcolumn';

UPDATE `PREFIX_configuration` SET `name` = '0' WHERE `name` LIKE 'PS_LEGACY_IMAGES' AND `value` LIKE '1';

The same cause applies for all of them. The targeted row to update just does not exist. Nonetheless there is one sql-update that works OK (so this is not a general problem, just a specific one for these 3 targeted rows).

 

My insight tells me that:

- It was not my fault. Even if I prefer human driven manual updates, the process was automatic (I could not misclick). I write an office text document for any task or action taken. This means that any web error is saved as a screenshot, any command-line log is copied and pasted into the document. On my notes for this task the document says everything was OK (no error detected whatsoever).

- The automatic upgrade failed twice. Either the SQL upgrade file was not executed, or tried to execute it and failed to report an underlying error. Which means inproperly reported everything was OK.

- Nonetheless I do consider that something was wrong before the update, when using the Prestashop v1.5.4.1. The missing rows present a question: ¿when they were supposed to be created?

 

I also checked SQL upgrade file to v1.5.4.1 and found two errors in my database schema:

- Table ps_orders, column reference, should be varchar(10) it is varchar(9).

- Table ps_order_payment, columnd order_reference, should be varchar(10) it is varchar(9).

So in essence I already got an invalid installation from previous update v1.5.4.0 to v1.5.4.1. Informative note: the v1.5.4.0 was a new installation not another upgrade.

I do not blame others for previous upgrade errors, but the PrestashopTeam should seriously consider writing a text document with a step-by-step manual. Let the users have the option to update the database schema and overwrite or replace php files manually.

 

(3) A very important note reagarding this issue

I need to clarify that the bug was not found the same day after the version upgrade. After a week or so a colleague enabled debug mode (to work on a theme we bought). This triggered the sql-insert into table ps_log problem. Which is critical because the error interrupts whatever action is in progress. In my scenario we we're not able to save product changes.

 

In my humble opinion and I conclude: other users might be affected by this issue, but they simply are not aware.

 

Yours,

Jordi

Edited by jordifs (see edit history)
Link to comment
Share on other sites

Hmm. I too have this settings as you have in our 1.5.5.0, jordifs:

 

I also checked SQL upgrade file to v1.5.4.1 and found two errors in my database schema:

- Table ps_orders, column reference, should be varchar(10) it is varchar(9).

- Table ps_order_payment, columnd order_reference, should be varchar(10) it is varchar(9).

 

I too have not been able to login to our 1.5.5 as Administrator but can log in as Customer(s). I am still searching throughout this forum to see if I can find someone with additional input so that I can get all together and try to "unlock" the administrator login. right now, I am dead stuck. So sad.

Link to comment
Share on other sites

  • 1 month later...

@Benjamin, this is a rather common problem. The first time I got was when I foolishly believed the claims by some people that the database hadn't been changed from 1.5.4.1 to 1.5.5. The second time was with a regular upgrade from 1.4.9 that also had other problems. Interestingly the second time it disappeared when I repaired (so I hope) an "addccs() is deprecated" warning. So it may only appear if errors have to be logged.

 

For those wanting to insert the id_employee field:

it comes after object_id, it is an int of length 10 and the default value is null. 

Please can somebody let me know how and where to add this missing id_employee in field list ?

 

I'm having the same problem on an upgraded Database from PS 1.3.1.1 GERMAN EDITION to PS 1.5.5.0

Link to comment
Share on other sites

  • 1 year later...

The problem persists. The table shop_url doesnt exist either in the master dbase or in this new one (which is a copy of the master dbase).

It seems like this is blocking both admin and front-end access.

 

any ideas/solutions?

 

See the errors here:

 

http://www.vaporsolutions.gr/newsite/

u got any solution for this because i have same error

Link to comment
Share on other sites

  • 2 years later...

I've added id_employee with the data suggested (INT, (10), NULL, DEFAULT, NULL but still a new error comes:


Fatal error: Unsupported operand types in /home/logobank/discon.logobankglobal.com/controllers/admin/AdminProductsController.php on line 859
 

Link to comment
Share on other sites

 

23 hours ago, tania said:

Fatal error: Unsupported operand types in /home/logobank/discon.logobankglobal.com/controllers/admin/AdminProductsController.php on line 859

do you want to provide us with line 859 of the specified file?

also what version of PHP and what version of Prestashop is being used?  be specific

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...