Page 1 of 1

RESOLVED: 2.0.1.0 admin panel login (error code + syntax)

Posted: Fri Dec 05, 2014 9:35 am
by OC_KQA
I recently upgraded from 1.5.6.4, with a successful install, and overcame some earlier issues, which now leads me to this:

After I login to the admin panel, the following error code populates my browser, followed by the actual admin panel below it:

Code: Select all

Warning: implode() [function.implode]: Invalid arguments passed in /home/content/.../admin/controller/common/header.php on line 58Warning: implode() [function.implode]: Invalid arguments passed in /home/content/.../admin/controller/common/header.php on line 59Warning: implode() [function.implode]: Invalid arguments passed in /home/content/.../admin/controller/common/header.php on line 62Warning: implode() [function.implode]: Invalid arguments passed in /home/content/.../admin/controller/common/header.php on line 63Warning: implode() [function.implode]: Invalid arguments passed in /home/content/.../admin/controller/common/stats.php on line 14Warning: implode() [function.implode]: Invalid arguments passed in /home/content/.../admin/controller/common/stats.php on line 22Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/.../admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home/content/.../admin/controller/common/stats.php on line 37
Additionally, while the admin panel loads (after initial login), the following syntax error simultaneously appears as a pop-window in my browser:

Code: Select all

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/content/.../admin/model/report/sale.php</b> on line <b>87</b><b>Notice</b>: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND DATE(date_added) >= '2014-12-1' GROUP BY DATE(date_added)' at line 1<br />Error No: 1064<br /> Error in: <b>/home/content/.../admin/model/report/sale.php</b> line <b>102</b><br />SELECT COUNT(*) AS total, date_added FROM `oc_order` WHERE order_status_id IN() AND DATE(date_added) >= '2014-12-1' GROUP BY DATE(date_added) in <b>/home/content/.../system/library/db/mysql.php</b> on line <b>53</b><b>Notice</b>: Trying to get property of non-object in <b>/home/content/.../admin/model/report/sale.php</b> on line <b>104</b><b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/content/.../admin/model/report/sale.php</b> on line <b>104</b>{"order":{"label":"Orders","data":[[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,0],[10,0],[11,0],[12,0],[13,0],[14,0],[15,0],[16,0],[17,0],[18,0],[19,0],[20,0],[21,0],[22,0],[23,0],[24,0],[25,0],[26,0],[27,0],[28,0],[29,0],[30,0],[31,0]]},"customer":{"label":"Customers","data":[[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,0],[10,0],[11,0],[12,0],[13,0],[14,0],[15,0],[16,0],[17,0],[18,0],[19,0],[20,0],[21,0],[22,0],[23,0],[24,0],[25,0],[26,0],[27,0],[28,0],[29,0],[30,0],[31,0]]},"xaxis":[["1","01"],["2","02"],["3","03"],["4","04"],["5","05"],["6","06"],["7","07"],["8","08"],["9","09"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["24","24"],["25","25"],["26","26"],["27","27"],["28","28"],["29","29"],["30","30"],["31","31"]]}
I'm not sure how to proceed at this point. I am still able to access and navigate through the admin panel, and I have not noticed any functional limitations within the admin panel (yet), but I have not fully explored the new interface either. Any suggestions or fixes to this issue would be greatly appreciated. Also, feel free to ask any clarifying questions to help problem solve the issue.

Thanks.

Re: HELP: 2.0.1.0 admin panel login (error code + syntax err

Posted: Fri Dec 05, 2014 6:49 pm
by pm-netti
Your must create in database to setting table settings config_processing_status and config_complete_status.
You can copy those from file opencart.sql.

Re: HELP: 2.0.1.0 admin panel login (error code + syntax err

Posted: Sat Dec 06, 2014 2:01 am
by OC_KQA
Thanks, but can you please explain specifically how to modify the database? I found the code you were referring to in the opencart.sql file, and I'm able to login to the database on my server directly, but I don't know how to create the settings within the database (and I certainly don't feel comfortable/confident enough to experiment on my own and risk creating new problems for myself).

Kindly advise, and thanks for your help.

Re: HELP: 2.0.1.0 admin panel login (error code + syntax err

Posted: Sat Dec 06, 2014 2:25 am
by pm-netti
OC_KQA wrote:Thanks, but can you please explain specifically how to modify the database? I found the code you were referring to in the opencart.sql file, and I'm able to login to the database on my server directly, but I don't know how to create the settings within the database (and I certainly don't feel comfortable/confident enough to experiment on my own and risk creating new problems for myself).

Kindly advise, and thanks for your help.
opencart.sql:

Code: Select all

(218, 0, 'config', 'config_processing_status', 'a:1:{i:0;s:1:"2";}', 1),
(219, 0, 'config', 'config_complete_status', 'a:1:{i:0;s:1:"5";}', 1),
Add those to table setting (Open setting table, press 'Insert'), setting_id is empty, field 'serialized' must be '1'.

Re: HELP: 2.0.1.0 admin panel login (error code + syntax err

Posted: Sat Dec 06, 2014 2:46 am
by OC_KQA
Thank you so much! Issue resolved. :)

Re: RESOLVED: 2.0.1.0 admin panel login (error code + syntax

Posted: Sun Dec 07, 2014 6:40 am
by eledesmaj
I did exactly what you said but I am still getting the popup error can you comment on how to correct that?

Re: RESOLVED: 2.0.1.0 admin panel login (error code + syntax

Posted: Sun Dec 07, 2014 7:02 am
by rph
Go to System > Users > User Groups. Edit your usergroup and add permissions for all the dashboard/* values.

Go to System > Settings > Edit > Option and under the Checkout heading make sure you have at least one value for "Processing Order Status" and "Complete Order Status".

Re: RESOLVED: 2.0.1.0 admin panel login (error code + syntax

Posted: Tue Dec 16, 2014 10:00 am
by Rainforest
Go to System > Users > User Groups. Edit your usergroup and add permissions for all the dashboard/* values.

Go to System > Settings > Edit > Option and under the Checkout heading make sure you have at least one value for "Processing Order Status" and "Complete Order Status".
RPH that was a much easier solution and solved that admin error that I too was getting.
I did have to also fill in some other settings in order to save changes but now it appears all is good.

Thank you!

Re: RESOLVED: 2.0.1.0 admin panel login (error code + syntax

Posted: Tue Feb 03, 2015 4:28 pm
by denmorru
Actually,
there are 2 columns: "code" and "group" in my updated DB,
which must have the same value:

Code: Select all

INSERT INTO `oc_setting` (`setting_id`, `store_id`, `code`, `key`, `value`, `serialized`,`group`) VALUES 
(218, 0, 'config', 'config_processing_status', 'a:1:{i:0;s:1:"2";}', 1,'config'),
(219, 0, 'config', 'config_complete_status', 'a:1:{i:0;s:1:"5";}', 1,'config');

Re: RESOLVED: 2.0.1.0 admin panel login (error code + syntax

Posted: Mon Apr 06, 2015 8:20 pm
by karlopencart
I had the same issues on a 1.5.6 > 20.20 upgrade.

Going to the shop admin > system > settings click save
You will then see a warning message complete all the required fields in all tabs and that shold sort the errors.

It is pointed out in the upgrade script Point 5.

Re: RESOLVED: 2.0.1.0 admin panel login (error code + syntax

Posted: Mon May 18, 2015 8:53 am
by haxcop
Thanks for this solution :crazy:

Re: RESOLVED: 2.0.1.0 admin panel login (error code + syntax

Posted: Wed Mar 02, 2016 10:00 pm
by saliverdim
hi,

2.0.3.1 upgrade to 2.1 .. how to fix error codes ? ı use phpmyadmin please write me steps ?

1-/home//public_html/admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home//public_html/admin/controller/common/stats.php on line 37

2-/home//public_html/admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home//public_html/admin/controller/common/stats.php on line 37Warning: array_merge(): Argument #1 is not an array in

3-is not an array in /home//public_html/admin/controller/common/stats.php on line 37Warning: in_array() expects parameter 2 to be array, null given in /home//public_html/admin/controller/common/stats.php on line 37Warning: array_merge(): Argument #1 is not an array

4-line 74Warning: implode(): Invalid arguments passed in /home//public_html/admin/controller/common/stats.php on line 14Warning: implode(): Invalid arguments passed in /home//public_html/admin/controller/common/stats.php on line 22Warning: array_merge(): Argument #

config line its ok. : define('DB_PORT', '3306');
new tables its ok x6

can you help me ? not run frontend website...all error show me on admincp

Re: RESOLVED: 2.0.1.0 admin panel login (error code + syntax

Posted: Wed Mar 02, 2016 10:35 pm
by saliverdim
help me please