Http 500 Error In Vendor Admin - Product Variations

Hi all.

I'm getting an http 500 error when I try to create new product variations or save changes to existing product variations via the vendor.php admin.

When I refresh the page, sometimes it takes me to the vendor dashboard and sometimes it logs me out and I have to log in again.

When I log back in I can see that the variations are created and the changes are made as requested so i don't know why I get this 500 error after I try to create or edit a product variation via vendor admin.

If I create or edit via marketplace admin, no issues. No 500 error.

Has anyone experienced the same problem? Does anyone have an idea what's affecting the vendor.php admin and product variations?

I was testing a size variation - one product with two sizes, 20ml and 50ml.

Thanks in advance.

You will need to find/review your PHP error_log file. The 500 error is generated from your webserver because the underlying PHP method has generated a fatal error.

You will need to find/review your PHP error_log file. The 500 error is generated from your webserver because the underlying PHP method has generated a fatal error.

Hi, thank you for your response. Nothing is showing on the marketplace error logs. Nothing on cpanel error log. What I don't understand is why the error is only showing for actions in the vendor admin but if I perform the same actions in the marketplace admin, there is no error. As an example, for the vendor admin page, if I go to

https://www.mystore.com/vendor.php?dispatch=products.manage

and change a product price from here then click save, the page switches to

http://www.mystore.com/vendor.php

and on that insecure page it shows

This page isn’t working

www.mystore.com is currently unable to handle this request.

HTTP ERROR 500

Then if I refresh the page, it goes to the secure vendor dashboard

https://www.mystore.com/vendor.php

or sometimes it will log me out after refresh and I have to log back into the vendor dashboard. In both cases, it will show that the changes I made have been saved.

This is also what happens if I try to create or edit product variations from the vendor admin.

The website switches from the page where the change is being made to http://www.mystore.com/vendor.phpto show the 500 error then after refresh, back to https://www.mystore.com/vendor.php (or log out).

Do you think this is an SSL issue? If so, why is it only happening to vendor admin and not marketplace admin? Any ideas? Is it vendor permissions maybe?

There are several "error logs" in cpanel. Most are related to http (your web server). You need to find the PHP error_log file and check it. Your hosting can help you find it. Im most current cpanel environments, it is located in /home/[cpanel account]/logs/[domain_name].php.error_log

A 500 error could mean any number of things. Suggest you work with your hosting to identify the cause if it's not a php error.

There are several "error logs" in cpanel. Most are related to http (your web server). You need to find the PHP error_log file and check it. Your hosting can help you find it. Im most current cpanel environments, it is located in /home/[cpanel account]/logs/[domain_name].php.error_log

A 500 error could mean any number of things. Suggest you work with your hosting to identify the cause if it's not a php error.

Ok, thanks again. It seems it's a php error. I found my php error log but there was nothing there. After a lot of googling I realised this was because the php.ini file was not logging php errors. So I added the code to log php errors in the php error log and lo and behold...I now have details of the php error (I think?)

Basically there are some PHP warnings in the log but I think it's the ones with "PHP Fatal Error" that are causing the 500 error?

So it seems the problem is with the vendor data premoderation addon. This makes sense because it seemed to me like an issue with vendor permissions since I wasn't getting the error as marketplace admin.

The two fatal errors I can see are:

1. PHP Fatal error:  Uncaught Error: Call to undefined function 
fn_vendor_data_premoderation_get_current_product_statuses() in 
/app/addons/vendor_data_premoderation/controllers/backend/products.post.php:38

Line 38 on that file mentioned in the error is included below:


if ($product_ids) {
        $current_statuses = fn_vendor_data_premoderation_get_current_product_statuses($product_ids);
        $pending_products = array_filter($current_statuses, function($status) {
            return $status === ProductStatuses::REQUIRES_APPROVAL;
        });

2. PHP Fatal error: Uncaught Error: Undefined class constant 'SECTION_PRODUCTS' in /app/addons/vendor_data_premoderation/schemas/notifications/notifications_center.post.php:19


Line 19 on that file mentioned in the error is included below:

$schema[NotificationsCenter::SECTION_PRODUCTS]['tags']['vendor_data_premoderation'] = [

'tag' => 'vendor_data_premoderation',

'tag_name' => __('product_approval'),

Do you or anyone else know what these errors mean? Vendor data premoderation seems to be a cs-cart default addon so is this a bug?


I have the settings for all options in this addon set to "Custom" and when I'm adding products as a vendor the vendor does not require approval for adding/editing products or editing profile. Oh and I'm using multivendor 4.10.4.SP2 if that helps.

Did you make upgrade recently? Looks like the Vendor premoderation module was not updated correctly

Did you make upgrade recently? Looks like the Vendor premoderation module was not updated correctly

Hi, I upgraded to 4.10.4 SP2 in May 2020 and I refused to upgrade to 4.11 series because I have seen many people on this forum having problems with it. I had problems just trying to upgrade to 4.11.1 so I gave up.

The problem is definitely the vendor data premoderation add on because I disabled it and I was still getting the fatal php errors. So after reading your question, I decided to uninstall it instead and guess what? No fatal php errors after uninstall.

I don't know how long there's been a problem with this add-on because I've never tried to add products as a vendor in the past. I only did it recently because I was trying to write a step-by-step userguide for my vendors. So the problem first appeared when I was creating and editing product variations as a vendor. Then I noticed the problem also extends to editing products via dispatch=products.manage page.

I would like to be able to moderate vendors adding/editing products but I'm not sure what to do if this add-on has a bug.

Contact support team and ask them to install module compatible with your Multi-Vendor version. Looks like something went wrong during upgrade

I would also give MHO that 4.11.x is much more stable than 4.10.x... Though I still hate working with the new checkout since they refuse to document the new attributes in use and what their behaviors are...

Thanks for your support EComLabs.

I would also give MHO that 4.11.x is much more stable than 4.10.x... Though I still hate working with the new checkout since they refuse to document the new attributes in use and what their behaviors are...

@tbirnseth I refused to upgrade to 4.11.x because I absolutely HATE the default cs cart one step checkout. When they said in 4.11.x they were going to get rid of the old step by step checkout this literally gave me sleepless nights. I'm not kidding lol.

So whilst on 4.10.4 I looked for a checkout addon alternative and found One step Checkout by CS Cart Rocks. I love this one.

Anyway, I've finally upgraded all the way to 4.11.3 (as far as I could go before my license expired lol). I'm not sure I want to renew the license but I see they have just released 4.11.5 with Paypal marketplace built in. Ugh!! Now the biggest dilemma for me because it would be nice to have that. I'll wait to see how other members respond to this new version before a pay $$$ for license renewal.

Anyway, back to the topic. I upgraded to 4.11.3 and no more errors with vendor data premoderation. The only thing I'm not sure is whether it moderates for existing vendors or only new vendors. I ask because I've put settings as require approval for all vendors excluding product price, quantity, etc. I tried to edit an existing vendor product description (I logged in as the vendor) and the change was published with no moderation.

Does anyone know what exactly gets moderated or what I'm doing wrong? This addon doesn't seem to be working as described in the CS Cart documentation.