CMS Builder 2.13 Preview Issue
5 posts by 2 authors in: Forums > CMS Builder
Last Post: December 16, 2011 (RSS)
By bragg31 - December 14, 2011
This page is displaying the correct current page minus the edit that I'm attempting to make.
Any thoughts on what may be causing this?
Thank you.
Re: [bragg31] CMS Builder 2.13 Preview Issue
By Jason - December 15, 2011
Could you please attach a copy of the page you're using for previewing the record?
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: [Jason] CMS Builder 2.13 Preview Issue
By bragg31 - December 15, 2011
Thank you for responding. I've attached one of the pages for your review.
Re: [bragg31] CMS Builder 2.13 Preview Issue
By bragg31 - December 15, 2011
I just compared the detail page code generated from this site to an older site I did using version 2.07 of your software and I did find a difference that seems to have solved the issue for me in this particular case.
This is the code generated from 2.07 for the detail page:
// load records
list($tid_bitsRecords, $tid_bitsMetaData) = getRecords(array(
'tableName' => 'tid_bits',{
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$tid_bitsRecord = @$tid_bitsRecords[0]; // get first record
Here is the code from the current version 2.13:
// load records
list($personal_insuranceRecords, $personal_insuranceMetaData) = getRecords(array(
'tableName' => 'personal_insurance',
'allowSearch' => '0',
'limit' => '1',
));
$personal_insuranceRecord = @$personal_insuranceRecords[0]; // get first record
The hightlighted line in the older version is what seemed to get the previews working again for me.
I guess my question now is did you phase that out of the current code generator for a reason? Should this be achieved a different way with the current v2.13?
Thank you.
Re: [bragg31] CMS Builder 2.13 Preview Issue
By Jason - December 16, 2011
Yes, that change in the code generator was made. From what you posted, I'm assuming that the personal_insurance section is a single record section. Since in a single record section, there will only ever be 1 record, there is never any need for a where clause, which is why it was phased out of the code generator.
That being said, under normal circumstances, both method would work correctly. The problem you encountered is that if there is a where clause in your getRecords call, the preview functions are not triggered correctly. It's usually best to have a separate PHP page that is only used for previewing.
Hope this helps clarify. Glad to hear everything is working correctly now.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/