Removed unwanted fields now shows strange code on page

2 posts by 2 authors in: Forums > CMS Builder
Last Post: July 6, 2012   (RSS)

By sandisturm - July 6, 2012

I erased fields i did not want to show on my listings, but now the listings are showing this code on the live page. This is just one section. It is showing on all fields i kept.

Notice: Undefined index: miles in /var/www/vhosts/travelingrv.com/httpdocs/products/listingDetail.php on line 57

I went into the Section Editor, Listings, and erased those I did not want to show up. I am using this for RV sales, and not auto, so a lot of the formatted fields were not necessary.

Did i do something wrong? Thanks for your help.

Re: [sandisturm] Removed unwanted fields now shows strange code on page

By Dave - July 6, 2012

Hi Sandy,

Anytime you erase or rename a field you need to remove or update any code that references it in your "viewer" files.

So in this case, just go to line 57 in listingDetail.php and remove the reference to $record['miles'] or 'miles'.

Or another way to do it is just run the code generator again. In any case, you only need to update the viewers when you add or remove fields, which usually isn't that often.

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