Leevi (Newism?) - we went to update our 1.6 install to 1.7.0 and were getting these errors:
Notice: Undefined index: sitemap_defaults_ in /home/site/public_html/system/extensions/ext.lg_better_meta.php on line 754
Warning: Invalid argument supplied for foreach() in /home/site/public_html/system/extensions/ext.lg_better_meta.php on line 754
Notice: Undefined index: weblogs_ in /home/site/public_html/system/extensions/ext.lg_better_meta.php on line 759
Warning: Invalid argument supplied for foreach() in /home/site/public_html/system/extensions/ext.lg_better_meta.php on line 759
Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/system/extensions/ext.lg_better_meta.php:754)
in /home/site/public_html/system/core/core.functions.php on line 296
Not sure what was going on there, but it looks like the upgrade part of the extension didn’t upgrade the table to add the new fields. So, we dropped the table and had the extension recreate the table. We went to re-enable the extension again and got the same errors.
I should point out that the errors are showing up when we go into “Settings” and hit submit. I published an article, and added a bunch of meta stuff to it, and that worked without issue. So it looks like only the Settings page is getting borked.
A-HA! Looks like these lines:
foreach ($_POST['sitemap_defaults_'] as $key => $value)
{
unset($_POST['sitemap_defaults_' . $key]);
}
foreach ($_POST['weblogs_'] as $key => $value)
{
unset($_POST['weblogs_' . $key]);
}
Need to become:
foreach ($_POST['sitemap_defaults'] as $key => $value)
{
unset($_POST['sitemap_defaults' . $key]);
}
foreach ($_POST['weblogs'] as $key => $value)
{
unset($_POST['weblogs' . $key]);
}
Note removal of the underscores. Working great now.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.