Page 1 of 1

OC 2.0 Notice: Undefined index: in profile.php on line 19

Posted: Mon Oct 06, 2014 11:58 pm
by mcurtis
Hi,

I did a fresh install of 2.0 and pointed my exising database of 1.5.6 to the new 2.0. It works for the most part but i am getting this error in the error log on the new 2.0 site.

"Notice: Undefined index: image in ***/admin/controller/common/profile.php on line 19"

When i compare the two files from 1.5.6 and 2.0 i get this:

1.5.6:
1.5.6_product_php.png

1.5.6 - 1.5.6_product_php.png (6.43 KiB) Viewed 3989 times

2.0:
2.0_product_php.png

2.0 - 2.0_product_php.png (6.86 KiB) Viewed 3989 times

What would i need to do to fix this? Thoughts?

Thanks in advance!

Re: OC 2.0 Notice: Undefined index: in profile.php on line 1

Posted: Wed Oct 08, 2014 6:08 am
by mcurtis
Thoughts?

Re: OC 2.0 Notice: Undefined index: in profile.php on line 1

Posted: Wed Oct 08, 2014 2:53 pm
by i2Paq
mcurtis wrote:Thoughts?
The db of a 1.5.x install is not ready to use with 2.0.

I'm not sure why you would follow this road your doing right now.

It is a recipe for disaster.

The upgrade-script will not solve this either.

Re: OC 2.0 Notice: Undefined index: in profile.php on line 1

Posted: Wed Oct 08, 2014 9:10 pm
by mcurtis
I decided to just make a new database and copy the database over from the old 1.5.6 store to the new 2.0.0 store so they each have their own database.

The reason why is i have over 750 products and didn't want to start from scratch. I figured 2 better solutions would be to either copy the database to a new one OR import the old to the new one.

I am sure this will get resolved in time but i wanted to experiment with what works and what doesn't. Copying the database to a new one seems to work as far as images, prices, etc.

Is there a better way you would know to do this?

Re: OC 2.0 Notice: Undefined index: in profile.php on line 1

Posted: Wed Oct 08, 2014 9:24 pm
by i2Paq
mcurtis wrote:Is there a better way you would know to do this?
Not atm.

Re: OC 2.0 Notice: Undefined index: in profile.php on line 1

Posted: Fri Jan 30, 2015 7:14 pm
by sunsys
It is surprising though that it is now 4 months and nobody has a solution to this query and it is also bad on the developers part to make such an in compatible upgrade which leaves all the users of previous versions of OC in lurch, is this proper.

I don't want to take away anything from the developers of OC, they are great bunch who have made a great software but social responsibility is also a part of the development program.

I hope you understand.

Thank You.

Re: OC 2.0 Notice: Undefined index: in profile.php on line 1

Posted: Mon May 25, 2015 5:44 am
by D4V4G
Pretty simple to fix just replace line 19 with the following

Code: Select all

if (isset($user_info['image']) && is_file(DIR_IMAGE . $user_info['image'])) {

Re: OC 2.0 Notice: Undefined index: in profile.php on line 1

Posted: Fri Apr 15, 2016 4:39 am
by godie88
The way to fix this is not by changing the code in the system's files. Thats actually a very bad habit which will lead to errors if upgrading in the future.

The real reason to why this is happening is because in the new version of OC, there is an extra column in the USER table (in the DATABASE) in comparison to the older version.

To fix this you need to manually add that column:

Code: Select all

COLUMN NAME: image
TYPE: VARCHAR 255
Once you do this, that error should go away.