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

LG Better Meta 1.7.x - Now with sitemap meta and generator! - Official Support Thread

Development and Programming

Kevin Evans's avatar
Kevin Evans
222 posts
16 years ago
Kevin Evans's avatar Kevin Evans

THanks.

I heard you might be offering a multi site license? How soon will you have that? cost?

       
Versa Studio's avatar
Versa Studio
572 posts
16 years ago
Versa Studio's avatar Versa Studio

Leevi and Server Gurus:

From what I can tell, Google wants site maps to be at the root, i.e., domain.com/sitemap or domain.com/sitemap.xml

However, following your code example in an EE template only yields domain.com/index.php/sitemap at best.

Is there some way to get this sitemap to sit at the root?

If not, perhaps there is one line I can add to my .htaccess that will alias domain.com/index.php/sitemap to domain.com/sitemap?

Thanks,

Ben

       
Versa Studio's avatar
Versa Studio
572 posts
16 years ago
Versa Studio's avatar Versa Studio

Update:

Google sitemap problem solved here: http://ellislab.com/forums/viewthread/105346/

       
Angie Herrera's avatar
Angie Herrera
357 posts
16 years ago
Angie Herrera's avatar Angie Herrera

I’ve been using LGBM for quite some time now and just noticed that it’s only half-working. Basically, it works great on most areas of the site but not in one particular weblog. In that weblog, the default title, description and keywords are used rather than what’s been specified in the Better Meta tab for that entry. The code for that weblog isn’t much different than for the other weblogs where Better Meta works as expected.

Here’s what I’ve got in the <head> tag (which is in one template):

{exp:lg_better_meta_pi:template
    entry_id="{embed:entry_id}"
    weblog_id="{embed:weblog_id}"
    url_title="{embed:url_title}"
    title="{embed:title}"
    description="{embed:description}"
    keywords="{embed:keywords}"
    author="{embed:author}"
    publisher="{embed:publisher}"
    rights="{embed:rights}"
    date_created="{embed:date_created}"
    date_modified="{embed:date_modified}"
    date_valid="{embed:date_valid}"
    identifier="{embed:identifier}"
    robots_index="{embed:robots_index}"
    robots_follow="{embed:robots_follow}"
    robots_archive="{embed:robots_archive}"
  }

Here’s how I embed that in other templates:

{embed="global/head" url_title="{segment_3}"}

I know the url_title=”{segment_3}” is correct for this particular weblog. In one particular entry within the weblog that’s having issues with LGBM, I get this on the rendered page:

Notice: Undefined index: 34 in /my/path/to/plugins/pi.lg_better_meta_pi.php on line 259

Notice: Undefined index: 34 in /my/path/to/plugins/pi.lg_better_meta_pi.php on line 264

Notice: Undefined index: 34 in /my/path/to/plugins/pi.lg_better_meta_pi.php on line 269

Any ideas?

       
Cafe de la Bourse's avatar
Cafe de la Bourse
8 posts
16 years ago
Cafe de la Bourse's avatar Cafe de la Bourse

Hi Leevi,

I just upgraded to the latest version.

I am trying to generate a sitemap, but here is what I get :

MySQL ERROR:

Error Number: 1054

Description: Unknown column 'lg_bm.priority' in 'field list'

Query: SELECT t.entry_id, t.weblog_id, t.forum_topic_id, t.author_id, t.ip_address, t.title, t.url_title, t.status, t.dst_enabled, t.view_count_one, t.view_count_two, t.view_count_three, t.view_count_four, t.allow_comments, t.comment_expiration_date, t.allow_trackbacks, t.sticky, t.entry_date, t.year, t.month, t.day, t.edit_date, t.expiration_date, t.recent_comment_date, t.comment_total, t.trackback_total, t.sent_trackbacks, t.recent_trackback_date, t.site_id as entry_site_id, w.blog_title, w.blog_name, w.blog_url, w.comment_url, w.tb_return_url, w.comment_moderate, w.weblog_html_formatting, w.weblog_allow_img_urls, w.weblog_auto_link_urls, w.enable_trackbacks, w.trackback_use_url_title, w.trackback_field, w.trackback_use_captcha, w.trackback_system_enabled, m.username, m.email, m.url, m.screen_name, m.location, m.occupation, m.interests, m.aol_im, m.yahoo_im, m.msn_im, m.icq, m.signature, m.sig_img_filename, m.sig_img_width, m.sig_img_height, m.avatar_filename, m.avatar_width, m.avatar_height, m.photo_filename, m.photo_width, m.photo_height, m.group_id, m.member_id, m.bday_d, m.bday_m, m.bday_y, m.bio, md.*, wd.* , lg_bm.priority as priority, lg_bm.change_frequency as change_frequency, lg_bm.include_in_sitemap as include_in_sitemap FROM exp_weblog_titles AS t LEFT JOIN exp_lg_better_meta AS lg_bm ON t.entry_id = lg_bm.entry_id LEFT JOIN exp_weblogs AS w ON t.weblog_id = w.weblog_id LEFT JOIN exp_weblog_data AS wd ON t.entry_id = wd.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id LEFT JOIN exp_member_data AS md ON md.member_id = m.member_id WHERE (lg_bm.include_in_sitemap = 'y' || lg_bm.include_in_sitemap = '' || lg_bm.include_in_sitemap IS NULL) AND t.entry_id IN (1416,1407,1415,1408,1413,1409,1410,1403,1411,1406,1391,1405,1402,1401,1400,1399,1393,1398,1364,1394,1390,1396,1360,1385,1369,1365,1392,1389,1387,1386,1357,1359,1264,1362,1336,1366,1363,1356,1361,1333,1358,1353,1352,1354,1355,1350,1351,1338,1349,1342,1339,1348,1345,1337,1347,1346,1344,1343,1332,1330,1335,1334,1328,1327,1326,1325,1323,1322,1312,1321,1313,1318,1302,1317,1315,1320,1314,1316,1311,1301,1289,1310,1309,1294,1293,1303,1286,1274,1300,1307,1292,1291,1285,1268,1288,1298,1252,1280,1282,1271) ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc

You can see that at http://www.cafedelabourse.com/sitemap

I am doing anything wrong ?

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham
I’ve been using LGBM for quite some time now and just noticed that it’s only half-working. Basically, it works great on most areas of the site but not in one particular weblog. In that weblog, the default title, description and keywords are used rather than what’s been specified in the Better Meta tab for that entry. The code for that weblog isn’t much different than for the other weblogs where Better Meta works as expected. Here’s what I’ve got in the <head> tag (which is in one template):
{exp:lg_better_meta_pi:template
    entry_id="{embed:entry_id}"
    weblog_id="{embed:weblog_id}"
    url_title="{embed:url_title}"
    title="{embed:title}"
    description="{embed:description}"
    keywords="{embed:keywords}"
    author="{embed:author}"
    publisher="{embed:publisher}"
    rights="{embed:rights}"
    date_created="{embed:date_created}"
    date_modified="{embed:date_modified}"
    date_valid="{embed:date_valid}"
    identifier="{embed:identifier}"
    robots_index="{embed:robots_index}"
    robots_follow="{embed:robots_follow}"
    robots_archive="{embed:robots_archive}"
  }
Here’s how I embed that in other templates:
{embed="global/head" url_title="{segment_3}"}
I know the url_title=”{segment_3}” is correct for this particular weblog. In one particular entry within the weblog that’s having issues with LGBM, I get this on the rendered page:
Notice: Undefined index: 34 in /my/path/to/plugins/pi.lg_better_meta_pi.php on line 259

Notice: Undefined index: 34 in /my/path/to/plugins/pi.lg_better_meta_pi.php on line 264

Notice: Undefined index: 34 in /my/path/to/plugins/pi.lg_better_meta_pi.php on line 269
Any ideas?

Just re-save your extension settings to add the new weblog.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham
Hi Leevi, I just upgraded to the latest version. I am trying to generate a sitemap, but here is what I get :
MySQL ERROR:

Error Number: 1054

Description: Unknown column 'lg_bm.priority' in 'field list'

Query: SELECT t.entry_id, t.weblog_id, t.forum_topic_id, t.author_id, t.ip_address, t.title, t.url_title, t.status, t.dst_enabled, t.view_count_one, t.view_count_two, t.view_count_three, t.view_count_four, t.allow_comments, t.comment_expiration_date, t.allow_trackbacks, t.sticky, t.entry_date, t.year, t.month, t.day, t.edit_date, t.expiration_date, t.recent_comment_date, t.comment_total, t.trackback_total, t.sent_trackbacks, t.recent_trackback_date, t.site_id as entry_site_id, w.blog_title, w.blog_name, w.blog_url, w.comment_url, w.tb_return_url, w.comment_moderate, w.weblog_html_formatting, w.weblog_allow_img_urls, w.weblog_auto_link_urls, w.enable_trackbacks, w.trackback_use_url_title, w.trackback_field, w.trackback_use_captcha, w.trackback_system_enabled, m.username, m.email, m.url, m.screen_name, m.location, m.occupation, m.interests, m.aol_im, m.yahoo_im, m.msn_im, m.icq, m.signature, m.sig_img_filename, m.sig_img_width, m.sig_img_height, m.avatar_filename, m.avatar_width, m.avatar_height, m.photo_filename, m.photo_width, m.photo_height, m.group_id, m.member_id, m.bday_d, m.bday_m, m.bday_y, m.bio, md.*, wd.* , lg_bm.priority as priority, lg_bm.change_frequency as change_frequency, lg_bm.include_in_sitemap as include_in_sitemap FROM exp_weblog_titles AS t LEFT JOIN exp_lg_better_meta AS lg_bm ON t.entry_id = lg_bm.entry_id LEFT JOIN exp_weblogs AS w ON t.weblog_id = w.weblog_id LEFT JOIN exp_weblog_data AS wd ON t.entry_id = wd.entry_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id LEFT JOIN exp_member_data AS md ON md.member_id = m.member_id WHERE (lg_bm.include_in_sitemap = 'y' || lg_bm.include_in_sitemap = '' || lg_bm.include_in_sitemap IS NULL) AND t.entry_id IN (1416,1407,1415,1408,1413,1409,1410,1403,1411,1406,1391,1405,1402,1401,1400,1399,1393,1398,1364,1394,1390,1396,1360,1385,1369,1365,1392,1389,1387,1386,1357,1359,1264,1362,1336,1366,1363,1356,1361,1333,1358,1353,1352,1354,1355,1350,1351,1338,1349,1342,1339,1348,1345,1337,1347,1346,1344,1343,1332,1330,1335,1334,1328,1327,1326,1325,1323,1322,1312,1321,1313,1318,1302,1317,1315,1320,1314,1316,1311,1301,1289,1310,1309,1294,1293,1303,1286,1274,1300,1307,1292,1291,1285,1268,1288,1298,1252,1280,1282,1271) ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc
You can see that at http://www.cafedelabourse.com/sitemap I am doing anything wrong ?

Looks like you don’t have the required table cell.

Try add priority to exp_lg_better_meta as an integer type.

Kind regards

       
michelG's avatar
michelG
32 posts
16 years ago
michelG's avatar michelG

Thank you, Leevy, for a wonderful extension.

Just spent a few hours testing it and would like to suggest a few feature requests:

• Possibility to re-organize the meta title components. • Option to apply default keywords and description per weblog. • Ability for editors who do not have permission rights to access the System Administration Utilities to still be able to edit the default meta values.

       
ender's avatar
ender
1,644 posts
16 years ago
ender's avatar ender

Having issues with getting LGBM to pull the correct metadata for the 2nd site in a MSM install on the index page. We are using closed entries in a weblog (that has LGBM turned on) and specifying the url_title.

site/index template:

{embed="site_includes/head" url_title="index_metadata" hide_site_title="yes"}

site_includes/head template:

{exp:lg_better_meta_pi:template
    url_title="{embed:url_title}"
    entry_id="{embed:entry_id}"
    weblog_id="{embed:weblog_id}"
    title="{embed:title}"
    title_suffix="{embed:title_suffix}"
    title_prefix="{embed:title_prefix}"
    hide_site_title="{embed:hide_site_title}"
    description="{embed:description}"
    keywords="{embed:keywords}"
    author="{embed:author}"
    publisher="{embed:publisher}"
    rights="{embed:rights}"
    date_created="{embed:date_created}"
    date_modified="{embed:date_modified}"
    date_valid="{embed:date_valid}"
    identifier="{embed:identifier}"
    robots_index="{embed:robots_index}"
    robots_follow="{embed:robots_follow}"
    robots_archive="{embed:robots_archive}"
}

each site has an entry in a weblog with url_title=index_metadata with the associated LGBM info.

http://keytosavannah.dev.emarketsouth.com is the primary site and is working fine http://keytotybee.dev.emarketsouth.com is the other site in MSM and is pulling the meta info for keytosavannah even though it shouldn’t really be able to see the entry with that information.

I looked in the exp_lg_better_meta database table and site_id was set to 1 for each site’s index_metadata entry, however manually setting site_id to 2 for the appropriate one didn’t change anything.

keytotybee is also giving us notices when logged in as admin:

Notice: Undefined index: 13 in /home/sites/keytosavannah2008/www/system/plugins/pi.lg_better_meta_pi.php on line 264

Notice: Undefined index: 13 in /home/sites/keytosavannah2008/www/system/plugins/pi.lg_better_meta_pi.php on line 269

Notice: Undefined index: 13 in /home/sites/keytosavannah2008/www/system/plugins/pi.lg_better_meta_pi.php on line 274

not sure if it’s related, but 13 is the weblog_id of the keytosavannah weblog that its index_metadata entry is in. 18 is the weblog_id of keytotybee’s

       
ender's avatar
ender
1,644 posts
16 years ago
ender's avatar ender

Ok so on a lark I went into your plugin file to see if I could make it work the way I needed to make it work, and I’m happy to say that it wasn’t too bad.

Not sure if this goes against intended functionality, or if you want to roll this into the next version, but here’s what I did:

right around line 185 I added another condition to the WHERE section when a url_title has been provided.

old:

$where = " WHERE exp_weblog_titles.url_title = '" . $params['url_title'] ."' ";

new:

$site_id = $PREFS->ini('site_id');
$where = " WHERE exp_weblog_titles.url_title = '" . $params['url_title'] ."' AND exp_weblog_titles.site_id = '$site_id'";

this prevents the url_title query from matching entries in another MSM installation.

Also we suggest changing the keywords field in the lg_better_meta table to type text in future releases, as 255 characters is overly restrictive (even if it is greater than the recommended length… SEO companies regularly give you 600+ characters of keywords to put in that field).

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

Sorry if this has been covered, but if there isn’t any Better Meta title given, how can I make Better Meta use the Title of the entry itself in the template tag?

Thanks!

       
michelG's avatar
michelG
32 posts
16 years ago
michelG's avatar michelG

Did you try, Brian? It should do it by default if you correctly specify the entry_id or url_title parameters.

Per these instructions.

It works that way on all my web sites.

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

Man I’m an idiot - it actually is working. Nothing to see here folks - move along 😉

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

Question about the {exp:lg_better_meta_pi:entries} and applying multiple weblogs to the weblog parameter, does this tag support conditionals to determine which weblog the content is from?

<?xml version="1.0" encoding="UTF-8"?>
<urlset >
    {exp:lg_better_meta_pi:entries
        weblog="blog|contest_entry"
        disable="categories|custom_fields|category_fields|custom_fields|member_data|pagination|trackbacks"
        dynamic="off"
        rdf="off"
        status="not closed"
    }
    <url>
        {if weblog == "blog"}<loc>http://my_site.com/blog/post/{url_title}/</loc> 
        {if:elseif weblog == "contest_entry"}<loc>http://my_site.com/vote/entry/{url_title}/</loc> 
        {/if}<lastmod>{edit_date format="%Y-%m-%d"}</lastmod>
        <changefreq>{change_frequency}</changefreq>
        {priority}</priority>
    </url>
    {/exp:lg_better_meta_pi:entries}
</urlset>

Or is there another way to accommodate multiple weblogs?

Thanks

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

Wondering if anyone might be able to answer my question above.

It seems Leevi refers to the ability to include multiple weblogs here unless I’m misunderstanding the reference to “weblog parameter” and he’s not referring to it with this extension in mind.

The trouble I’ve run into is that though the {exp:lg_better_meta_pi:entries} tag seems to accept multiple weblogs I see no way to distinguish content from one weblog over another which results in incorrect locations.

Maybe I’ve missed something (this wouldn’t surprise me one bit)?

Anybody have advice?

Thanks

       
First 7 8 9 10 11

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.