Problem with Products module after upgrade

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
jospanner
Forum Members
Forum Members
Posts: 105
Joined: Tue Mar 25, 2008 11:34 pm

Problem with Products module after upgrade

Post by jospanner »

I today upgraded my core to 1.12 and all various modules (see details below)

If I now try to create a new product I receive the following error message;

ERROR: INSERT INTO cms_module_products (product_name, price, details, create_date, modified_date, taxable, status, weight, sku, alias, url) VALUES ('cxz',0,'

cz
','2015-07-06 15:17:32','2015-07-06 15:17:32',1,'published',0,'','cxz','')
Unknown column 'url' in 'field list'

Can anyone advise as to what is the problem please? My site details follow:

----------------------------------------------

Cms Version: 1.12

Installed Modules:

CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.5
MenuManager: 1.8.6
MicroTiny: 1.2.9
ModuleManager: 1.5.8
News: 2.15.1
Search: 1.7.12
ThemeManager: 1.1.8
FormBuilder: 0.8.1.1
Showtime: 3.4
CGExtensions: 1.48.5
CGSimpleSmarty: 1.9.1
JQueryTools: 1.3.5.2
Products: 2.24.1
CGSmartImage: 1.20.1


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 10000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.4.34
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 0
memory_limit: 384M
max_execution_time: 120
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 10M
upload_max_filesize: 10M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.42
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages
Server Time Diff: No filesystem time difference found


----------------------------------------------
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Re: Problem with Products module after upgrade

Post by Guido »

All I can say is I faced the exact same problem. I ended up re-installing the entire products module, but there may be a better solution:

The error is that the table 'cms_module_products' is missing a column named 'url' (a new functionality in Products 2.14). When you save a new product, the module will try to write to this column (even if it is empty) but the column does not exist (maybe some error in the Products upgrade method)?

You could (I haven't tested this) create a column in the beforementioned table 'cms_module_products', I believe it has to be a VARCHAR type, max 255 characters (I don't remember if it's supposed to be NULL or NOTNULL) and see if it'll save products now.

As I said, I haven't tested this so be sure to backup your site before trying this.
jospanner
Forum Members
Forum Members
Posts: 105
Joined: Tue Mar 25, 2008 11:34 pm

Re: Problem with Products module after upgrade

Post by jospanner »

Thanks Guido. I ended up rolling back the whole site to 1.11.13 and older modules as I couldn't spot where the error lay. I shall investigate your suggestion.

Looks like it might be an issue for several people then?
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Re: Problem with Products module after upgrade

Post by Guido »

Well at first I thought it may have been a glitch on my side, but now that I see more people having this problem there may be a bug in the update script.

If you do manage to update to the latest versions, and run into other problems, check out the scope of your variables. This has also been introduced in this CMSMS (1.12) version. Basically, if you set variables in a template that you want to use in parent templates (let's say you want to pass the product name to the page title of the 'head' section of your page template) you need to add 'scope=global' to the assignment of your variables.
jospanner
Forum Members
Forum Members
Posts: 105
Joined: Tue Mar 25, 2008 11:34 pm

Re: Problem with Products module after upgrade

Post by jospanner »

Thanks - does this mean the issue lies with the core upgrade or the products module or both?
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Re: Problem with Products module after upgrade

Post by Guido »

Two separate issues:
  1. The products module may have a bug in the update procedure that failes to create the 'url' column the version 2.14 of Products is trying to write to. Also, we could have a similar database issue that prevents the extra column from being made. Maybe the author (Calguy) can take a look at this. I know re-installing the module will fix it (you'd have to export all products from your existing install and import them back in after re-installing the module), but in my opinion, adding a column isn't that hard (use phpmyadmin, you could make a parallel install and install Products 2.14 to see exactly what the column name and charasteristics should be)
  2. If you want to use Products 2.14, you need at least CMSMS version 1.12, which comes with an updated version of Smarty (this is a guess but I can't thing of another reason the scoping mechanism has changed). That scoping mechanism basically means that when you declare (create) a variable it will no longer be available in all other templates, unless you add scope=global to the {assign} call. It may very well be possible that you don't use any self-defined variables and won't run into problems with this, but it's good to know anyway.
jospanner
Forum Members
Forum Members
Posts: 105
Joined: Tue Mar 25, 2008 11:34 pm

Re: Problem with Products module after upgrade

Post by jospanner »

All very helpful and I appreciate you taking the time to reply.
Post Reply

Return to “Modules/Add-Ons”