We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

[Solved] LG Better Meta 1.7.x Initial Installation Errors

Development and Programming

Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

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.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

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.

       
Newism's avatar
Newism
30 posts
16 years ago
Newism's avatar Newism

Good catch! Not sure why that is not failing on my install… Let me check my code.

       
Newism's avatar
Newism
30 posts
16 years ago
Newism's avatar Newism

Hey Ryan,

Those lines of code should be:

foreach ($_POST['sitemap_defaults'] as $key => $value)
{
  unset($_POST['sitemap_defaults_' . $key]);
}

foreach ($_POST['weblogs'] as $key => $value)
{
  unset($_POST['weblogs_' . $key]);
}

I’ll update the download now.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

I’ll update our install. Not totally sure how the sitemap works yet, but this is looking pretty smooth!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.