Possible Bug? Single Records field names may not have certain names

7 posts by 3 authors in: Forums > CMS Builder
Last Post: March 20, 2009   (RSS)

By guido_ch - March 18, 2009

In CMS Builder, when having Single Records be aware of naming fields i.e. like "title" or "page" or similar system used names even if it uses a compleat other database table, otherwise it can happen that the records are just ignored without any error message. I got nuts finding out, why some single records suddenly did not show up for no reason. I.e. I had a single record named "page" which did not show up anymore as soon I also used the "per Page" function, because it uses "page" as system variable. Another one was: When I used a single record field name "title" and I used a search query "title,content_query" the single record also did not show up anymore, because it somehow conflicted with the search query expression.

Any Experiances to this?

Cheers
Guido

Re: [guido_ch] Possible Bug? Single Records field names may not have certain names

By Dave - March 18, 2009

Hi Guido,

Can you display your php info screen. There's a link to it at the bottom of: Admin > General or you can link direct like this: admin.php?menu=admin&action=phpinfo

Let me know which version of PHP you are using and what the values are for "register_globals" (search for it). I think your server may have an old deprecated PHP feature still enabled.

If it's set to "On" try adding this line (in red) to your cmsAdmin/.htaccess to disable it:

<IfModule mod_php5.c>
php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_value upload_max_filesize 100M
php_value post_max_size 100M
</IfModule>


Hope that helps! Let me know if that fixes it. If not we'll keep looking.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Possible Bug? Single Records field names may not have certain names

By guido_ch - March 18, 2009

Hi Dave

We use a pretty actual PHP Version 5.2.6 and register_globals is off

Strange... anyhow I just renamed the fieldnames to more precise ones like "homepage_title" instead of "title" to avoid conflicts with other field names. Cause "title" is pretty in every section :-)

I guess it only happens with single records, so if you have for example a single record Section named "Homepage" with a field named "title" wich in this example is supposed to display the Title of the Homepage, and on the same page you have a MultiRecord List named "Articles" with a field named "title" aswell and now you do a search query in a form like "title,content_query", which transmits the query by url the returning page does ignore the single record "title" and every other single record from that section (!) and only displays the field "title" from the MultiRecord Section "Articles".

I guess it happnes, because in the search query "title,content_query" do no further precise definition, which one of all the sections should be searched. (I have more than one) so the viewer_functions.php somehow just ignores all single record entries, when building the output variables cause the first field "title" from the singleRecord "Homepage" did conflict with "title" from the multiRecord Section "Articles"

Writing down this I am wondering anyway, why I can not define which section is ment to be searched ina search query, to avoid conflicts. (Or can I ? :-)

Cheers
Guido

Re: [guido_ch] Possible Bug? Single Records field names may not have certain names

By Dave - March 18, 2009

Hi Guido,

Ok, Thanks. I think I have a better understanding. Try adding this option to your single record viewer code to tell it to ignore search terms:

'allowSearch' => false,

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [guido_ch] Possible Bug? Single Records field names may not have certain names

By ross - March 19, 2009

Hi Guido

The code Dave posted should actually work. Basically, it's telling the viewer to ignore the variables in your URL.

Could you post a copy of the page for me to take a look at?

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [guido_ch] Possible Bug? Single Records field names may not have certain names

By Dave - March 20, 2009

Guido,

Actually, if you could email me the urls of the page in question, FTP details, and instructions how to reproduce the issue I could take a look at this for you. Email dave@interactivetools.com. Email, don't post login details to the forum.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com