August 24, 2011 at 1:14 am #5574
After developing my site in parallel to another WP site on my server, I wiped out the older version of WordPress, and moved the fresh copy according to some tech docs. All seemed to work well minus an image or two I had to relink – or so I thought. I since have found out that I get the following error showing up when I got into the Template Builder area to create or modify templates for this theme:
Warning: Invalid argument supplied for foreach() in /home/omegaav/public_html/wp-content/themes/brightbox/framework/php/class-htmlhelper.php on line 932
Well – i open up the classhtmlhelper.php and scroll down to line 932 which is the start of the following code:
foreach ($elements as $dynamic_element)
if(empty($dynamic_element['name'])) $dynamic_element['name'] = $dynamic_element['id'];
$output .= "<option value='". $dynamic_element['id']."'>". $dynamic_element['name']."</option>";
$output .= '</select>';
$output .= '<span class="avia_select_fake_val">Select Element</span></span>';
$output .= ' <a href="#" class="avia_button avia_dynamical_add_elements" title="'.$element['name'].'" id="avia_'.$element['id'].'">Add Element</a>';
$output .= ' <span class="avia_loading avia_beside_button_loading"></span>';
$output .= ' </span>';
$output .= ' <input class="avia_dynamical_add_elements_parent" type="hidden" value="'.$element['slug'].'" />';
$output .= ' <input class="avia_dynamical_add_elements_config_file" type="hidden" value="'.$element['options_file'].'" />';
$output .= '</div>';
It doesn’t seem to be affecting the site I am continuing to develop but I sure would like to know how to fix it. Any ideas?
Thanks in advance,
Steve ButlerAugust 24, 2011 at 6:29 am #50920August 24, 2011 at 3:47 pm #50921
Do you mean for me to hit the “reset all options” button on the “theme options” page?
Will that delete all of my defined templates?August 24, 2011 at 10:05 pm #50922
yes, reset all options in the theme options. This will remove all the options you set through the theme options menu. Custom created templates will also be deleted but the standard templates will remain.August 25, 2011 at 12:59 am #50923August 25, 2011 at 5:51 am #50924
Normally a db backup will also restore/save the template but it seems like some server configuration cause problems after a theme path change. I’d replicate the templates manually for now and make a db backup afterwards (I assume the theme path won’t change anymore from now on).
The topic ‘Template builder errors after moving WP installation from subfolder to root’ is closed to new replies.