Post by california » Tue Aug 31, 2010 6:17 pm

hi all!

My site is just upgraded for 1.4.9, from 1.4.8b, but for some reason I am unable to access the front site when the "Maintenance" mode is on, even when logged in as admin. Anyone meet with this bug too?

David

Newbie

Posts

Joined
Tue Aug 31, 2010 6:05 pm

Post by mbaldock2001 » Tue Aug 31, 2010 6:33 pm

california wrote:hi all!

My site is just upgraded for 1.4.9, from 1.4.8b, but for some reason I am unable to access the front site when the "Maintenance" mode is on, even when logged in as admin. Anyone meet with this bug too?

David
see the beginning of this thread ("Post any OpenCart 1.4.9 Final Bugs here!"):
http://forum.opencart.com/viewtopic.php?f=31&t=19293

M

OC v1.4.9.1
(dev:)WampServer v2.0: Apache 2.2.11, PHP 5.3.0, MySQL 5.1.36
(prod:) Apache , PHP 2.10.0.2, MySQL 5.1.37


Newbie

Posts

Joined
Sun Mar 14, 2010 3:27 am
Location - Paris, France

Post by a110y » Wed Sep 01, 2010 4:53 am

"Warning: Invalid argument supplied for foreach() in /var/www/opencart/system/library/user.php on line 43"

How to repeat: Admin Panel > Users > User Groups > Insert > uncheck all boxes on both "select lists"

Logout and try to login in again.

Possible remedy: Check if the permissions column is actually an array, proceed only if it is (or perhaps cast it as an array).
Last edited by a110y on Wed Sep 01, 2010 5:12 am, edited 1 time in total.

Newbie

Posts

Joined
Wed Sep 01, 2010 4:47 am

Post by Qphoria » Wed Sep 01, 2010 5:00 am

a110y wrote:"Warning: Invalid argument supplied for foreach() in /var/www/opencart/system/library/user.php on line 43"

Ways to Repeat: Admin Panel > Users > User Groups > Insert > uncheck all boxes on both "select lists"

Logout and try to login in again.

Possible remedy: Check if the permissions column is actually an array, proceed only if it is (or perhaps cast it as an array).
Aha, yes WINNER!. That one has likely been there since version 1.0. Thanks

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Wed Sep 01, 2010 5:03 am

Qphoria wrote:
a110y wrote:"Warning: Invalid argument supplied for foreach() in /var/www/opencart/system/library/user.php on line 43"

Ways to Repeat: Admin Panel > Users > User Groups > Insert > uncheck all boxes on both "select lists"

Logout and try to login in again.

Possible remedy: Check if the permissions column is actually an array, proceed only if it is (or perhaps cast it as an array).
Aha, yes WINNER!. That one has likely been there since version 1.0. Thanks
I imagine so. I doubt too many people have tried to create users with no permissions whatsoever. Kind of a pointless exercise I would think.

And no I'm not saying the bug shouldn't be fixed. Just not too surprising it's remained undetected till now.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by a110y » Wed Sep 01, 2010 5:08 am

Qphoria: I believe (although I don't claim) there are a few more cases where a similar error would occur (just did a quick grep) including here:

Code: Select all

$ grep -R -n 'unserialize' *
admin/model/user/user_group.php:22:				$data = unserialize($user_group_query->row['permission']);
admin/model/user/user_group.php:36:			'permission' => unserialize($query->row['permission'])
admin/controller/setting/setting.php:809:			$this->data['config_token_ignore'] = unserialize($this->config->get('config_token_ignore'));
admin/controller/common/home.php:258:				$config_ignore = unserialize($this->config->get('config_token_ignore'));
system/library/cache.php:31:	      		return unserialize($cache);
system/library/customer.php:51:				$cart = unserialize($customer_query->row['cart']);
system/library/user.php:23:	  			foreach (unserialize($user_group_query->row['permission']) as $key => $value) {
system/library/user.php:43:	  		foreach (unserialize($user_group_query->row['permission']) as $key => $value) {
Again, it's just a crude test ...

Xsecrets: Just experimenting with my new toy. :p

Newbie

Posts

Joined
Wed Sep 01, 2010 4:47 am

Post by a110y » Wed Sep 01, 2010 5:10 am

... Yep, there are more for sure:

Code: Select all

Warning: Invalid argument supplied for foreach() in /var/www/opencart/system/library/user.php on line 23

Newbie

Posts

Joined
Wed Sep 01, 2010 4:47 am

Post by amdev » Wed Sep 01, 2010 9:47 pm

I try this>>>- Adding items to cart shows no products in cart (same solution as the first one) [FIX]
But it not work... ??? ??? ???

ร้านค้าออนไลน์
OpenCart Thailand Support Forum
How to Upgrade oc1.5 to 2.0.1.1
Upgrading OpenCart From v.1.4 or v.1.5 to V.2.2 Step by step


User avatar
Active Member

Posts

Joined
Fri Nov 27, 2009 3:40 pm
Location - Bangkok - Thailand

Post by Qphoria » Wed Sep 01, 2010 9:57 pm

amdev wrote:I try this>>>- Adding items to cart shows no products in cart (same solution as the first one) [FIX]
But it not work... ??? ??? ???
It should. Clear your cookies and try again

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Thu Sep 02, 2010 12:10 am

If getting emails from paypal that say:
PP_Standard - Possible Scam: IPN/PDT Receiver Email does not match seller email. Order needs manual verification
This is because you are not using the main email on the paypal account as your opencart paypal account. I did not take this into account initially. The fix is below:

1. EDIT: catalog/controller/payment/pp_standard.php

2. FIND (near the bottom):

Code: Select all

// verify paypal email matches
if (isset($data['receiver_email']) && $data['receiver_email'] != $this->config->get('pp_standard_email')) {
	$this->error = $this->language->get('error_email_mismatch');
}
3. REPLACE WITH:

Code: Select all

// verify paypal email matches
if (isset($data['receiver_email']) && strtolower($data['receiver_email']) != strtolower($this->config->get('pp_standard_email'))) {
	if (isset($data['business']) && strtolower($data['business']) != strtolower($this->config->get('pp_standard_email'))) {
		$this->error = $this->language->get('error_email_mismatch');
	}
}

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JAY6390 » Thu Sep 02, 2010 12:56 am

I had this come up on mine too, but realised what it was, and just changed my default PP email address

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Thu Sep 02, 2010 2:48 am

1.4.8 bug that snuck into 1.4.9.
The "checkout" button in the sidebox is not HTTPS

1. EDIT: catalog/controller/module/cart.php

2. FIND:

Code: Select all

$this->data['checkout'] = HTTP_SERVER . 'index.php?route=checkout/shipping';
3. REPLACE WITH:

Code: Select all

$this->data['checkout'] = HTTPS_SERVER . 'index.php?route=checkout/shipping';
4. FIND:

Code: Select all

$checkout = HTTP_SERVER . 'index.php?route=checkout/shipping';
5. REPLACE WITH:

Code: Select all

$checkout = HTTPS_SERVER . 'index.php?route=checkout/shipping';

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by webfeetdesign » Thu Sep 02, 2010 3:11 am

Its not in the sidebox module, its in the main shopping basket in the center content. I can't find that code if I look in the cart.php file.

Active Member

Posts

Joined
Fri Feb 05, 2010 1:28 am
Location - Dubai

Post by Qphoria » Thu Sep 02, 2010 3:57 am

webfeetdesign wrote:Its not in the sidebox module, its in the main shopping basket in the center content. I can't find that code if I look in the cart.php file.
No. The main shopping basket has it correct. Only the sidebox was missing it. If you aren't finding it then I don't think you have 1.4.9 or 1.4.8

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fettabachi » Thu Sep 02, 2010 8:15 am

Hello,

This concerns the fix for the Maintenance Mode issue. I applied the fix and it works until I log-in as a user on the front-end to test cart functionality. After logging the test user out of the front end, the page defaults to maintenance mode again. In order to view the store front again, I have to clear the cache each time.

Has anyone else experienced this?

Thanks

User avatar
Newbie

Posts

Joined
Tue Aug 17, 2010 10:13 pm

Post by Qphoria » Thu Sep 02, 2010 9:00 am

fettabachi wrote:Hello,

This concerns the fix for the Maintenance Mode issue. I applied the fix and it works until I log-in as a user on the front-end to test cart functionality. After logging the test user out of the front end, the page defaults to maintenance mode again. In order to view the store front again, I have to clear the cache each time.

Has anyone else experienced this?

Thanks
Be sure you use this fix
http://forum.opencart.com/viewtopic.php ... 293#p94774
And clear all cookies

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fettabachi » Thu Sep 02, 2010 10:54 am

Hello,

I believe that I have corrected the code properly.
Image

Thanks

User avatar
Newbie

Posts

Joined
Tue Aug 17, 2010 10:13 pm

Post by i2Paq » Thu Sep 02, 2010 1:11 pm

fettabachi wrote:Hello,

This concerns the fix for the Maintenance Mode issue. I applied the fix and it works until I log-in as a user on the front-end to test cart functionality. After logging the test user out of the front end, the page defaults to maintenance mode again. In order to view the store front again, I have to clear the cache each time.

Has anyone else experienced this?

Thanks
Yes, I have the same.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by LeorLindel » Thu Sep 02, 2010 5:24 pm

Hi,

I noticed that it missed in the file upload/catalog/controller/account/login.php:

Code: Select all

    	$this->data['text_account'] = $this->language->get('text_account');

Tous les packs de langues Française depuis la v1.4.7 et toutes les versions intégrales 100 % Français sont disponibles sur le Portail Officiel Français.

Image


User avatar
Active Member

Posts

Joined
Mon Feb 22, 2010 8:05 pm

Post by linkstate » Thu Sep 02, 2010 6:47 pm

Hi,
its nothing serious but would be good to include in new version:

in mail subject use correct czech (not only) characters with uft8 encoding. Solution is here.

http://forum.opencart.com/viewtopic.php ... 751#p39883


Plus another bug related to search (with foreign characters):
somewhere in index.php put:

Code: Select all

setlocale(LC_ALL, substr($languages[$code]['locale'],0,strpos($languages[$code]['locale'], ","))); 
to set locale by settings in admin.

And configure CKeditor not to translate foreign characters to entity:
admin/view/javascript/ckeditor/config.js

Before end

Code: Select all

};
add:

Code: Select all

	config.entities = false;

http://www.internet24.cz webové služby pro Vás.


Newbie

Posts

Joined
Wed Sep 01, 2010 11:50 pm

Who is online

Users browsing this forum: No registered users and 16 guests