CMS MADE SIMPLE FORGE

Cataloger

 

[#5681] $notes field not present on Content Edit screen

avatar
Created By: (jmmpc)
Date Submitted: Mon Nov 15 14:05:22 -0500 2010

Assigned To: Samuel Goldstein (sjg)
Version: 0.9
CMSMS Version: None
Severity: Major
Resolution: None
State: Open
Summary:
$notes field not present on Content Edit screen
Detailed Description:
In the default Category table template, you have the $notes attribute listed in
the HTML template. However on the Content Edit screen there is no field
available to edit this particular attribute. Is this some old coding left over,
or am I missing something??

I have a feeling that on a previous version, the $note attribute used to allow
for a TextArea box on the Content Edit screen and that I had used that in the
past to populate the category with normal paragraphs of information.

Please could someone confirm this is the case? If so I will no longer use the
$notes variable - however that could make things a bit tricky when upgrading
sites from a previous version if the attribute is not usable in the newer
version....


History

Comments
avatar
Date: 2010-11-15 14:09
Posted By: Samuel Goldstein (sjg)

Sounds like a bug to me. The notes field should carry over from the previous
field.

Was this an upgrade from version 0.8?
      
avatar
Date: 2010-11-15 15:21
Posted By:  (jmmpc)

When I first experienced it it was when I upgraded from CMS 1.8.2 to CMS 1.9
running 0.8. It broke it and I lost the information so I restore back to the
previous version from the backup.

However since then I have tested with a clean CMS install 1.9 and 0.9 of the
Cataloger and the field still does not appear.

I would like to use CMS 1.9 with the 0.9 Cataloger, however I just don't seem to
be able to get the $notes field to work. If i manage to get it working on a
clean install then maybe I can look again at upgrading my CMS 1.8.2 install with
0.8 Cataloger.
      
avatar
Date: 2010-11-18 11:07
Posted By:  (jmmpc)

Has anyone been able to confirm this is a bug, and not just something weird with
my setup.

Any feedback greatly appreciated. 
      
avatar
Date: 2011-10-04 17:18
Posted By: mktskk (mktskk)

Yes this is a bug in file method_install.php
Change the code:

$query = 'INSERT INTO '. cms_db_prefix(). 'module_catalog_attr
(id,type_id,is_textarea,attribute) VALUES (?,?,?,?)';
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 1, 'Item Notes'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 2, 1, 'Category Notes'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 3, 1, 'Catalog Notes'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 0, 'Weight'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 0, 'Medium/Media'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 0, 'Dimensions'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 0, 'Price'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 0, 'In Stock?'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 3, 0, 'Copyright'));

to this:

$query = 'INSERT INTO '. cms_db_prefix(). 'module_catalog_attr
(id,type_id,field_type,attribute) VALUES (?,?,?,?)';
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 'textarea', 'Item Notes'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
$dbresult = $db->Execute($query,array($new_id, 2, 'textarea', 'Category
Notes'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
$dbresult = $db->Execute($query,array($new_id, 3, 'textarea', 'Catalog
Notes'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 'text', 'Weight'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 'text', 'Medium/Media'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 'text', 'Dimensions'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 'text', 'Price'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 1, 'text', 'In Stock?'));
        $new_id = $db->GenID(cms_db_prefix()."module_catalog_attr_seq");
		$dbresult = $db->Execute($query,array($new_id, 3, 'text', 'Copyright'));


As You can see there is no column "is_textarea" in 0.9 version, so it should
replaced with new "field_type" and enter the correct attributes
      
Updates

Updated: 2010-11-15 14:09
resolution_id: => 5