Post by burakcarkci » Fri Oct 27, 2017 1:01 pm

Hi guys, I am getting this error when I click save button on the product edit page. Does anyone have a fix for this? By the way when I am editing a product I define everything. Still getting this.

Code: Select all

Notice: Undefined index: product_seo_url in /home/content/07/7446907/html/online/admin/controller/catalog/product.php on line 1193
Notice: Undefined index: points in /home/content/07/7446907/html/online/admin/model/catalog/product.php on line 140
Notice: Undefined index: subtract in /home/content/07/7446907/html/online/admin/model/catalog/product.php on line 187
Notice: Undefined index: price in /home/content/07/7446907/html/online/admin/model/catalog/product.php on line 187
Notice: Undefined index: price_prefix in /home/content/07/7446907/html/online/admin/model/catalog/product.php on line 187
Notice: Undefined index: points in /home/content/07/7446907/html/online/admin/model/catalog/product.php on line 187
Notice: Undefined index: points_prefix in /home/content/07/7446907/html/online/admin/model/catalog/product.php on line 187
Notice: Undefined index: weight in /home/content/07/7446907/html/online/admin/model/catalog/product.php on line 187
Notice: Undefined index: weight_prefix in /home/content/07/7446907/html/online/admin/model/catalog/product.php on line 187
Warning: Cannot modify header information - headers already sent by (output started at /home/content/07/7446907/html/online/admin/controller/startup/error.php:34) in /home/content/07/7446907/html/online/system/library/response.php on line 36

Newbie

Posts

Joined
Thu Sep 28, 2017 11:41 am

Post by straightlight » Tue Nov 14, 2017 4:40 am

The exact Opencart version was not provided. However, the product_seo_url database field does not exist in the core of Opencart. These errors are caused by an installed extension.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ozguryetgin » Wed Jun 20, 2018 7:29 pm

Hello guys i have a similar issue when saving a product ?



Notice: Undefined index: product_seo_url in /home/sentawebikondri/storage/modification/admin/controller/catalog/product.php on line 1224
Notice: Undefined index: points in /home/sentawebikondri/storage/modification/admin/model/catalog/product.php on line 141
Notice: Undefined index: price in /home/sentawebikondri/storage/modification/admin/model/catalog/product.php on line 188
Notice: Undefined index: points in /home/sentawebikondri/storage/modification/admin/model/catalog/product.php on line 188
Notice: Undefined index: points_prefix in /home/sentawebikondri/storage/modification/admin/model/catalog/product.php on line 188
Notice: Undefined index: weight in /home/sentawebikondri/storage/modification/admin/model/catalog/product.php on line 188
Notice: Undefined index: weight_prefix in /home/sentawebikondri/storage/modification/admin/model/catalog/product.php on line 188
Warning: Cannot modify header information - headers already sent by (output started at /home/sentawebikondri/public_html/admin/controller/startup/error.php:34) in /home/sentawebikondri/public_html/system/library/response.php on line 36

Newbie

Posts

Joined
Fri May 04, 2018 10:51 pm

Post by straightlight » Thu Jun 21, 2018 10:11 pm

/home/sentawebikondri/storage/modification/
Caused by an installed extension. Ensure that the declared indexed fields still exists on the database product table.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ozguryetgin » Fri Jun 22, 2018 12:21 am

yes my theme has 3 extensions but what sould i do exactly now?

Newbie

Posts

Joined
Fri May 04, 2018 10:51 pm

Post by nightwing » Sat Jan 04, 2020 8:14 pm

Hi straightlight,

I got a similar error: PHP Notice: Undefined index: option_value_id in /storage/modification/admin/model/catalog/product.php on line 199
I checked the DB and I am seeing product_option_value_id, I also ran a check on the Database, all Tables returned OK. Do you have any other insights on this? This is actually the first time I am getting these errors (2 duplicates at the same time) but I do have a multivendor extension (updated 02-01-20), auto-assign related products extension (installed 02-01-20), x-shipping (2 Months), and email verification (2 weeks). I recently installed vQmod (On Thursday).
This error came about while I was sleeping and I am the only one that has access to the store as it is not yet public. Could it be that an assigned option longer exists in the DB?

I am using OC Default, 3.0.3.2
Thank you!
straightlight wrote:
Thu Jun 21, 2018 10:11 pm
/home/sentawebikondri/storage/modification/
Caused by an installed extension. Ensure that the declared indexed fields still exists on the database product table.

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by IP_CAM » Sat Jan 04, 2020 9:26 pm

You should better re-consider your decision, to install VqMod, after all,
OcMod is doing the same, just in another way. And the consequences
of such weird doings are well known already throughout this Forum ... :choke:
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by straightlight » Sat Jan 04, 2020 9:33 pm

seanstorm100 wrote:
Sat Jan 04, 2020 8:14 pm
Hi straightlight,

I got a similar error: PHP Notice: Undefined index: option_value_id in /storage/modification/admin/model/catalog/product.php on line 199
I checked the DB and I am seeing product_option_value_id, I also ran a check on the Database, all Tables returned OK. Do you have any other insights on this? This is actually the first time I am getting these errors (2 duplicates at the same time) but I do have a multivendor extension (updated 02-01-20), auto-assign related products extension (installed 02-01-20), x-shipping (2 Months), and email verification (2 weeks). I recently installed vQmod (On Thursday).
This error came about while I was sleeping and I am the only one that has access to the store as it is not yet public. Could it be that an assigned option longer exists in the DB?

I am using OC Default, 3.0.3.2
Thank you!
straightlight wrote:
Thu Jun 21, 2018 10:11 pm
/home/sentawebikondri/storage/modification/
Caused by an installed extension. Ensure that the declared indexed fields still exists on the database product table.
You are seeing the product_option_value_id on the database table but do you actually see the option_value_id as well? If not, undefined index means that the field itself could either not be queried or found on the database table itself.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by nightwing » Sat Jan 04, 2020 11:02 pm

Noted, let me check and get back to you.
straightlight wrote:
Sat Jan 04, 2020 9:33 pm
seanstorm100 wrote:
Sat Jan 04, 2020 8:14 pm
Hi straightlight,

I got a similar error: PHP Notice: Undefined index: option_value_id in /storage/modification/admin/model/catalog/product.php on line 199
I checked the DB and I am seeing product_option_value_id, I also ran a check on the Database, all Tables returned OK. Do you have any other insights on this? This is actually the first time I am getting these errors (2 duplicates at the same time) but I do have a multivendor extension (updated 02-01-20), auto-assign related products extension (installed 02-01-20), x-shipping (2 Months), and email verification (2 weeks). I recently installed vQmod (On Thursday).
This error came about while I was sleeping and I am the only one that has access to the store as it is not yet public. Could it be that an assigned option longer exists in the DB?

I am using OC Default, 3.0.3.2
Thank you!
straightlight wrote:
Thu Jun 21, 2018 10:11 pm


Caused by an installed extension. Ensure that the declared indexed fields still exists on the database product table.
You are seeing the product_option_value_id on the database table but do you actually see the option_value_id as well? If not, undefined index means that the field itself could either not be queried or found on the database table itself.

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by nightwing » Sat Jan 04, 2020 11:19 pm

Hey straightlight,

(Please open images in new tab)

The closest thing I've seen is oc_option_value this:
Image

and within that there is option_value_id column. I am not a 100% certain if this is what you meant. When I check the oc_product table, I am not seeing an option_value_id column.
Image

Please let me know.
straightlight wrote:
Sat Jan 04, 2020 9:33 pm
seanstorm100 wrote:
Sat Jan 04, 2020 8:14 pm
Hi straightlight,

I got a similar error: PHP Notice: Undefined index: option_value_id in /storage/modification/admin/model/catalog/product.php on line 199
I checked the DB and I am seeing product_option_value_id, I also ran a check on the Database, all Tables returned OK. Do you have any other insights on this? This is actually the first time I am getting these errors (2 duplicates at the same time) but I do have a multivendor extension (updated 02-01-20), auto-assign related products extension (installed 02-01-20), x-shipping (2 Months), and email verification (2 weeks). I recently installed vQmod (On Thursday).
This error came about while I was sleeping and I am the only one that has access to the store as it is not yet public. Could it be that an assigned option longer exists in the DB?

I am using OC Default, 3.0.3.2
Thank you!
straightlight wrote:
Thu Jun 21, 2018 10:11 pm


Caused by an installed extension. Ensure that the declared indexed fields still exists on the database product table.
You are seeing the product_option_value_id on the database table but do you actually see the option_value_id as well? If not, undefined index means that the field itself could either not be queried or found on the database table itself.

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by letxobnav » Sat Jan 04, 2020 11:32 pm

undefined index means that the variable is used as a pointer to an array value but that pointer does not exist.
as in $x = $data['y']; and there is no $data['y'] defined/present.
/storage/modification/admin/model/catalog/product.php on line 199
better state what is on line 199 so you know if it comes from a database query or from the data array passed to the function which in turn may come from the post array from the product form.

as it is a modified file, you only know what is on line 199.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by nightwing » Sun Jan 05, 2020 1:19 am

Hi letxobnav,

Here is the code if this is what you wanted:

Code: Select all

198 - foreach ($product_option['product_option_value'] as $product_option_value) {
199 - 	$this->db->query("INSERT INTO " . DB_PREFIX . "product_option_value SET product_option_value_id = '" . 
                (int)$product_option_value['product_option_value_id'] . "', product_option_id = '" . (int)$product_option_id . "', product_id = '" . (int)$product_id . "', 
                option_id = '" . (int)$product_option['option_id'] . "', option_value_id = '" . (int)$product_option_value['option_value_id'] . "', quantity = '" .                                                 
                (int)$product_option_value['quantity'] . "', subtract = '" . (int)$product_option_value['subtract'] . "', price = '" . (float)$product_option_value['price'] . "', 
                price_prefix = '" . $this->db->escape($product_option_value['price_prefix']) . "', points = '" . (int)$product_option_value['points'] . "', points_prefix = '" . 
                $this->db->escape($product_option_value['points_prefix']) . "', weight = '" . (float)$product_option_value['weight'] . "', weight_prefix = '" . $this->db- 
                >escape($product_option_value['weight_prefix']) . "'");
                
200                	}
201					}
202				} else {
203					$this->db->query("INSERT INTO " . DB_PREFIX . "product_option SET product_option_id = '" . (int)$product_option['product_option_id'] . "', product_id = '" . (int)$product_id . "', option_id = '" . (int)$product_option['option_id'] . "', value = '" . $this->db->escape($product_option['value']) . "', required = '" . (int)$product_option['required'] . "'");
204				}
205			}
206		}
letxobnav wrote:
Sat Jan 04, 2020 11:32 pm
undefined index means that the variable is used as a pointer to an array value but that pointer does not exist.
as in $x = $data['y']; and there is no $data['y'] defined/present.
/storage/modification/admin/model/catalog/product.php on line 199
better state what is on line 199 so you know if it comes from a database query or from the data array passed to the function which in turn may come from the post array from the product form.

as it is a modified file, you only know what is on line 199.

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by straightlight » Sun Jan 05, 2020 2:50 am

The provided screenshot links are invalid from your previous post.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by nightwing » Sun Jan 05, 2020 4:14 am

Hey straightlight,

Those are the only items I could find in the DB that relate to the error. Is there a particular table I could check for this, for example, oc_product.
straightlight wrote:
Sun Jan 05, 2020 2:50 am
The provided screenshot links are invalid from your previous post.

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by letxobnav » Sun Jan 05, 2020 6:56 am

Then this is the array reference giving the warning:

Code: Select all

(int)$product_option_value['option_value_id']
there is no pointer 'option_value_id' present in array $product_option_value which is referenced when trying to insert the record in the product_option_value table.

array $product_option_value comes from array $product_option['product_option_value'] and
$product_option['product_option_value'] comes from array $data['product_option']

So that is not a database field/index issue but most likely an extension problem as the $data array is passed to the function editProduct when saving a product.
In other words, the data passed to the function in $data['product_option'] is not complete.

you could trace it by placing

Code: Select all

$this->log->write(print_r($data['product_option'],true));
just after

Code: Select all

if (isset($data['product_option'])) {
then check your oc error log

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by nightwing » Sun Jan 05, 2020 7:59 am

Thanks letxobnav,

I will add that and place the errors when they come back. I haven't seen them again since morning.
letxobnav wrote:
Sun Jan 05, 2020 6:56 am
Then this is the array reference giving the warning:

Code: Select all

(int)$product_option_value['option_value_id']
there is no pointer 'option_value_id' present in array $product_option_value which is referenced when trying to insert the record in the product_option_value table.

array $product_option_value comes from array $product_option['product_option_value'] and
$product_option['product_option_value'] comes from array $data['product_option']

So that is not a database field/index issue but most likely an extension problem as the $data array is passed to the function editProduct when saving a product.
In other words, the data passed to the function in $data['product_option'] is not complete.

you could trace it by placing

Code: Select all

$this->log->write(print_r($data['product_option'],true));
just after

Code: Select all

if (isset($data['product_option'])) {
then check your oc error log

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by nightwing » Sun Jan 05, 2020 8:03 am

Hey,

i have two:

Code: Select all

if (isset($data['product_option'])) {
One at line 190 and the other line 44. Should I place after the line 190?
seanstorm100 wrote:
Sun Jan 05, 2020 7:59 am
Thanks letxobnav,

I will add that and place the errors when they come back. I haven't seen them again since morning.
letxobnav wrote:
Sun Jan 05, 2020 6:56 am
Then this is the array reference giving the warning:

Code: Select all

(int)$product_option_value['option_value_id']
there is no pointer 'option_value_id' present in array $product_option_value which is referenced when trying to insert the record in the product_option_value table.

array $product_option_value comes from array $product_option['product_option_value'] and
$product_option['product_option_value'] comes from array $data['product_option']

So that is not a database field/index issue but most likely an extension problem as the $data array is passed to the function editProduct when saving a product.
In other words, the data passed to the function in $data['product_option'] is not complete.

you could trace it by placing

Code: Select all

$this->log->write(print_r($data['product_option'],true));
just after

Code: Select all

if (isset($data['product_option'])) {
then check your oc error log

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm


Post by letxobnav » Sun Jan 05, 2020 4:20 pm

you can do both, one is in the function to add a product and one in the function to edit the product (update).

it should list out the entire options record structure in your oc error log so you can see the variables used/missing like:

Code: Select all

2020-01-05 16:19:10 - Array
(
    [0] => Array
        (
            [product_option_id] => 299
            [name] => Gift Bag Options
            [option_id] => 14
            [type] => checkbox
            [required] => 0
            [product_option_value] => Array
                (
                    [0] => Array
                        (
                            [option_value_id] => 61
                            [product_option_value_id] => 164
                            [quantity] => 0
                            [subtract] => 0
                            [price_prefix] => +
                            [price] => 30.0000
                            [points_prefix] => +
                            [points] => 0
                            [weight_prefix] => +
                            [weight] => 0.00000000
                        )

                    [1] => Array
                        (
                            [option_value_id] => 62
                            [product_option_value_id] => 165
                            [quantity] => 0
                            [subtract] => 0
                            [price_prefix] => +
                            [price] => 60.0000
                            [points_prefix] => +
                            [points] => 0
                            [weight_prefix] => +
                            [weight] => 0.00000000
                        )

                )

        )

)

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by nightwing » Sun Jan 05, 2020 9:20 pm

Thank you, I will get straight to that!
letxobnav wrote:
Sun Jan 05, 2020 4:20 pm
you can do both, one is in the function to add a product and one in the function to edit the product (update).

it should list out the entire options record structure in your oc error log so you can see the variables used/missing like:

Code: Select all

2020-01-05 16:19:10 - Array
(
    [0] => Array
        (
            [product_option_id] => 299
            [name] => Gift Bag Options
            [option_id] => 14
            [type] => checkbox
            [required] => 0
            [product_option_value] => Array
                (
                    [0] => Array
                        (
                            [option_value_id] => 61
                            [product_option_value_id] => 164
                            [quantity] => 0
                            [subtract] => 0
                            [price_prefix] => +
                            [price] => 30.0000
                            [points_prefix] => +
                            [points] => 0
                            [weight_prefix] => +
                            [weight] => 0.00000000
                        )

                    [1] => Array
                        (
                            [option_value_id] => 62
                            [product_option_value_id] => 165
                            [quantity] => 0
                            [subtract] => 0
                            [price_prefix] => +
                            [price] => 60.0000
                            [points_prefix] => +
                            [points] => 0
                            [weight_prefix] => +
                            [weight] => 0.00000000
                        )

                )

        )

)

Regards,
Nightwing
Access to my Free Extensions: https://www.opencart.com/index.php?rout ... =nightwing


Active Member

Posts

Joined
Tue Nov 05, 2019 11:08 pm

Who is online

Users browsing this forum: No registered users and 520 guests