inclusion of list field causes error in admin

6 posts by 3 authors in: Forums > CMS Builder
Last Post: February 17, 2011   (RSS)

By Deborah - February 15, 2011

Hi. Hoping someone can help me here as I've not been able to find this same issue in the forum.

I have a section editor (home_pg_random_ads) for which I have specified a list field from another table (graphics_home_pg_random_ads) for image selection.

I can upload images to the (graphics_home_pg_random_ads) editor, but when I choose to modify or create a new ad in the (home_pg_random_ads) editor, I see the following error message:

Warning: Cannot modify header information - headers already sent by (output started at /vservers/mysite/htdocs/cmsmysite/lib/menus/header.php:13) in /vservers/mysite/htdocs/cmsmysite/lib/database_functions.php on line 587 There was an error creating the list field. MySQL Error: Unknown column 'file_upload' in 'field list'

*path edited for security
---------

Section editor for upload of graphics:
graphics_home_pg_random_ads

Upload textfield title:
title

Upload field name:
file_upload

---------

Section editor for web page display:
home_pg_random_ads

List field for images (pulldown):
graphic_for_ad

List Options: Get options from database
Section Tablename: graphics_home_pg_random_ads
Use this field for option values: file_upload
Use this field for option labels: title

---------

I don't know if this is an issue with version 2.04 or if I'm doing something incorrect (most likely the latter).

Any advice would be greatly appreciated.

~ Deborah

Re: [Deborah] inclusion of list field causes error in admin

By Deborah - February 16, 2011

Please disregard my prior post.

I'm not 100% sure, but I believe the admin error was due to my of the pound symbol (#) in the 'title' field of the file_upload field, combined with my use of 'title' for value. I removed the # and am using 'num' for values.

Deborah

Re: [Deborah] inclusion of list field causes error in admin

By Jason - February 16, 2011

Hi Deborah,

Is everything working for you now? Let us know if you run into any issues.

thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Deborah] inclusion of list field causes error in admin

By Rusty - February 16, 2011 - edited: February 16, 2011

It's not just you I'm having the exact same problem.

I have 2 section editors, 1 for the Blog, and 1 for Featured Image.

Featured Image is setup with only a Title field (descriptor) and an Upload field (for the image)

Blog is configured just like a regular blog would be, and I have a List Field, Displayed as Pulldown List (Single Item Menu List). List options are pulled from the Database, calling up the featured_image Section Tablename, using the IMG for values, and the title for Labels.

I want to be able to have the functionality to create a blog post and when doing so select a single item from a drop down list choosing the image I would like to show.

I'm getting two crazy errors :D

First error: rears its ugly head when I actually go to view the Blog section, none of the Blog Post Titles are showing up. (modify & erase still do)

Second error: rears its head when I modify a post, at the very top I get the following:


Warning: Cannot modify header information - headers already sent by (output started at /public_html/admin/lib/menus/header.php:13) in
/public_html/admin/lib/database_functions.php on line 606 There was an error creating the list field. MySQL Error: Unknown column 'img' in 'field list'


Also the record creation fields, stops rendering based upon the location of the "Featured Image" list. If it's at the bottom of the page, all the rest of the record creation fields (like to create a new blog post) will appear, and then it stops rendering past that. If it's first, above title, nothing else will show past that.



EDIT

I think it stems from CMS Building not knowing how to handle the image. What I wanted to do is that if "Image 1" was selected that the file upload URL for "Image 1" would be passed to the "featured_image" variable.

I'm currently experimenting with how to pull the image upload url into the specific blog post based upon list selection within cmsb.
Rusty

Re: [Rusty] inclusion of list field causes error in admin

By Jason - February 17, 2011

Hi Rusty,

The error your experiencing is from MySQL:
MySQL Error: Unknown column 'img' in 'field list'

Somewhere you're trying to select a field called img that doesn't exist.

Hope this helps shed some light on the issue.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/