VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: SamTzu on August 23, 2012, 13:52:57 PM

Title: Uninitialized string offset
Post by: SamTzu on August 23, 2012, 13:52:57 PM
Hi.

I'm not sure if this is Virtuemart or Joomla problem so I'm posting it here.

After adding some products in the shopping cart in a newly migrated Virtuemart shop the user is "kicked out" of the shop and asked to login again.

Apache log states...

Quote[Tue Aug 21 17:34:37 2012] [error] [client 217.25.105.37] File does not exist: /var/www/clients/client8/web385/web/administrator/templates/bluestork/css/rounded.css, referer: http://akvaario2.shop1.internet-content.net/index.php?option=com_virtuemart&tmpl=component&view=product&task=edit&virtuemart_product_id=560
[Thu Aug 23 14:08:38 2012] [error] [client 62.78.244.37] PHP Notice:  Uninitialized string offset: 0 in /var/www/clients/client8/web385/web/libraries/joomla/application/application.php on line 373, referer: http://akvaario2.shop1.internet-content.net/login

Category menu is visible only to registered users and looks like the "VirtueMart Category" module just stopped showing the categories to the registered test users. We can only see it if it's changed to public. (edit: Category module becomes visible after logging out and login in again.)

I'm not sure what to make of this. Does Joomla somehow 'lose' the registered user or is it Virtuemart?
Title: Re: Uninitialized string offset
Post by: SamTzu on August 23, 2012, 14:15:29 PM
Line 373 starts with...

Quoteif ($url[0] == '/')
                        {
                                // We just need the prefix since we have a path relative to the root.
                                $url = $prefix . $url;
                        }
                        else
                        {
                                // It's relative to where we are now, so lets add that.
                                $parts = explode('/', $uri->toString(array('path')));
                                array_pop($parts);
                                $path = implode('/', $parts) . '/';
                                $url = $prefix . $path . $url;
                        }
Title: Re: Uninitialized string offset
Post by: SamTzu on August 24, 2012, 13:02:55 PM
I changed the Database session handler setting from Joomla to None and the problem went away.

Global Configuration
System
Session Settings
Session Handler

Looks like a bug in MySQL options somewhere.