Jump to content

[SOLVED] PrestaShopDatabaseException (backoffice orders)


Recommended Posts

Hi,

 

When i go to my backoffice, orders i can see the old and new ordes and their status but when i click on any of them i get the following error:

 

[PrestaShopDatabaseException]
 
Table 'prestashop_5.ps_order_paymentcard' doesn't exist SELECT * FROM `ps_order_paymentcard` WHERE `id_order` ="20";
at line 605 in file classes/db/Db.php
 
599. WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
600. }
601. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
602. {
603. if ($sql)
604. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
605. throw new PrestaShopDatabaseException($this->getMsgError());
606. }
607. }
608. 
609. /**
 
Now i have a table named `prstshp_order_paymentcard` that is empty and another named `prstshp_order_payment` that has 4 rows (2 of ican see in my bakoffice)
My backoffice has a total of 20 orders.and this are store in the table named `prstshp_orders` 
How can solve this error?
Thank you
Edited by lamplats (see edit history)
  • Like 1
Link to comment
Share on other sites

Having same issue after upgrading from ps 1.5.4.1  to  1.5.6.1.

 

I have attached a screenshot of error. Getting this issue when tried to login my back office.

It gives this error instead of login screen.  

 

It's all happen after update. Really need help from experts. 

 

Kindly see the file attached.

 

Looking forward to your response. Thank you.

 

(Sorry for my bad English).

post-621323-0-34905400-1389916528_thumb.jpg

Link to comment
Share on other sites

I think i solved it.

 

Open the file named offlinecardpayment.php which is in \modules\offlinecardpayment and change the ps_order_paymentcard to prstshp_order_paymentcard. 

 

Now the new orders are registering (as before, that wasnt the problem) but now i can also access them from the backoffice and i can change the status of the order.

 

Remeber to take a back up of the file.

 

That was my solution to my problem.

 

Your problem is similar but not the same.

 

As i can see you have this module that awards customers for certain behavior.

That module tries to add a value to a column named start day into a db table. The problem is that it cant find that column. Access your database and confirm that (see also if there is a column named stop date). Maybe you can try to add tha column by your self(be very careful, i have a local instalation of my shop so i feel free to do this kind of changes)

The file that tries to do that is in \modules\gamification and it is named gamification.php

 

From my understanding this is a paid module so you can ask for support from the seller

 

I am not an expert.

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

Hello Iamplats,

 Thank you very much for your response and support.

I actually did not find the module "offlinecardpayment" in my directory. So in my case obviously problem is not same as yours.

 

I can see the module gamification in directory but i am really sorry that i am totally non experienced and i did not got it what you suggested above to do with this module. I have resolved some issues and errors before but all the solutions i found were step by step and well explained (Mostly by PrestaShop Moderators/Experts).

 

So i beg your help if you can explain a bit more. Looking forward for further response 

 

Regards,

Aun Jabbar

 

 

 

(Sorry for my poor english, i hope you can understand what i tried to said).

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

Dear aun4some1

 

The name of the module that causes the error is Gamification - customers expertise. This is a paid module and it gives discount rewards for your customers. The start day propaply is needed to tell how old a customer is, in order for him to get his reward (for being registered since that date). Now i cant test that module since it is a paid one but i found out the following:

 

The file that causes the problem is modules / gamification / classes / Advice.php

 

that file creates the array and access the db.

 

Access your database and confirm that thers is an array named advice (ps_advice) and see if it has these columns:

'id_ps_advice' 
'id_tab' =>                 
'selector' =>          
'location' =>               
'validated' =>               
'start_day' =>                
'stop_day' => 
 
Now i understand that not being able to access backoffice is really important and that you need this problem fixed asap
First take a backup via FTP and from the database.
Then you have this options
1) Restore from the last backup before the update that gave you this problem.(recommended solution) or
2) Delete the module via FTP, access your backoffice and reinstall. or
3) Fix this array yourself and see if the problem continues or
4) Contact the aythor of this module via pm (http://www.prestashop.com/forums/user/132608-vekia/)
 
Now that you know what the problem is you can start another topic naming the exact problem and get help from people that actually have this module and can test it(I dont have it and i cant get it so is hard for me to give you step by step directions)
 
Please let me know the name of the new topic and if the author of this module helped you.
  • Like 2
Link to comment
Share on other sites

 

Dear aun4some1

 

The name of the module that causes the error is Gamification - customers expertise. This is a paid module and it gives discount rewards for your customers. The start day propaply is needed to tell how old a customer is, in order for him to get his reward (for being registered since that date). Now i cant test that module since it is a paid one but i found out the following:

 

The file that causes the problem is modules / gamification / classes / Advice.php

 

that file creates the array and access the db.

 

Access your database and confirm that thers is an array named advice (ps_advice) and see if it has these columns:

'id_ps_advice' 
'id_tab' =>                 
'selector' =>          
'location' =>               
'validated' =>               
'start_day' =>                
'stop_day' => 
 
Now i understand that not being able to access backoffice is really important and that you need this problem fixed asap
First take a backup via FTP and from the database.
Then you have this options
1) Restore from the last backup before the update that gave you this problem.(recommended solution) or
2) Delete the module via FTP, access your backoffice and reinstall. or
3) Fix this array yourself and see if the problem continues or
4) Contact the aythor of this module via pm (http://www.prestashop.com/forums/user/132608-vekia/)
 
Now that you know what the problem is you can start another topic naming the exact problem and get help from people that actually have this module and can test it(I dont have it and i cant get it so is hard for me to give you step by step directions)
 
Please let me know the name of the new topic and if the author of this module helped you.

 

 

Wow ... Error was resolved by deleting the module via FTP as i did not need that module.

 

But another error was occurred "Fatal error: Call to undefined function imagecreatefromjpeg()"

 

So by acting upon your advice, i restored the upgradation that is working fine.

 

Thank you very much for you support and help and well explanation :)

 

I wonder why did you say above  "I am not an expert" 

Link to comment
Share on other sites

I just came back to let you people know that after resolve the "DatabaseException" error, I immediately got  "Fatal error: Call to undefined function imagecreatefromjpeg()"  that is also resolved after 5 days :) 

 

The problem was GD library was disable in WHM, as i am on shared hosting, i called my hosting provider and asked him to enable GD library and now all is well :)

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

I had the same problem. Delete module gamification helped me.

 

It happened to me when I crossing an to a new web domain. I found that I damaged some files.

I uploaded the files again to ftp. Web works also with module gamification.

 

If this happens to you after upgrade - I recommended to check the files on the ftp. Where all. Sits size files.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Thanks

 

 

Dear aun4some1

 

The name of the module that causes the error is Gamification - customers expertise. This is a paid module and it gives discount rewards for your customers. The start day propaply is needed to tell how old a customer is, in order for him to get his reward (for being registered since that date). Now i cant test that module since it is a paid one but i found out the following:

 

The file that causes the problem is modules / gamification / classes / Advice.php

 

that file creates the array and access the db.

 

Access your database and confirm that thers is an array named advice (ps_advice) and see if it has these columns:

'id_ps_advice' 
'id_tab' =>                 
'selector' =>          
'location' =>               
'validated' =>               
'start_day' =>                
'stop_day' => 
 
Now i understand that not being able to access backoffice is really important and that you need this problem fixed asap
First take a backup via FTP and from the database.
Then you have this options
1) Restore from the last backup before the update that gave you this problem.(recommended solution) or
2) Delete the module via FTP, access your backoffice and reinstall. or
3) Fix this array yourself and see if the problem continues or
4) Contact the aythor of this module via pm (http://www.prestashop.com/forums/user/132608-vekia/)
 
Now that you know what the problem is you can start another topic naming the exact problem and get help from people that actually have this module and can test it(I dont have it and i cant get it so is hard for me to give you step by step directions)
 
Please let me know the name of the new topic and if the author of this module helped you.

 

Thank you. Thank you. Thank you.

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...