Are you trying to add standard quotes or curly quotes to your page title?
Sheesh, missed this post. They are just standard quotes. Seems like quotes in the description field of an entry don’t get properly escaped or converted. See my thread called “LG Better Meta: Not escaping quotes in descriptions” about that. Also running into issue with apostrophes being passed to the title or title_suffix parameters.
I normally do my Better Meta this way, with a simple embed at the top of the template:
{embed="common/_pagetop" url_title="" entry_id="" title="Features" title_suffix="{segment_2_category_name}"}
Then in _pagetop, along with things like the doctype, I have the Better meta plugin:
{exp:lg_better_meta_pi:template
entry_id="{embed:entry_id}"
url_title="{embed:url_title}"
title="{embed:title}"
description="{embed:description}"
keywords="{embed:keywords}"
title_suffix="{embed:title_suffix}"
hide_site_title = "{embed:hide_site_title}"
}
In this case I’m using Low’s Seg2Cat extension to get the proper name of the category from segment_2. When that extension returns the category name “Speaker’s Corner” I get the result in the attached pic.
I thought it might be Low’s extension, so I assign a variable right on the template, type it in manually, and embed that instead:
{assign_variable:testtitle="Speaker's Corner"}
That works but is not dynamic. So, because I have an real entry for that “Speaker’s Corner” section (so I could apply Better Meta to the landing page) I tried wrapping the embed with the entries tag and passing the title (simplified entries tag here):
{exp:weblog:entries weblog="feature_categories" dynamic="off" url_title="{segment_2}"}
{embed="common/_pagetop" url_title="" entry_id="" title="Features" title_suffix="{title}"}
{/exp:weblog:entries}
Again, I get the result in the the attached pic, with the entity.
So I thought it might be the fact that I’m embedding. So I re-wrote my template so that Better Meta is right on the template (yuk) instead of in my site-wide _pagetop embed.
{exp:weblog:entries weblog="feature_categories" dynamic="off" url_title="{segment_2}"}
{exp:lg_better_meta_pi:template title="Features" title_suffix="{title}"}
{/exp:weblog:entries}
That also resulted in the entity.
Seems like I can’t dynamically pass a variable to the BMeta plugin that has an apostrophe. Should I encode the apostrophe in the category field itself? What if the client adds a new category called “The Monkey’s Banana” - would I have to tell them to encode it?
I just went live from my production domain to my new live domain and now Better Meta throws me an error. When creating the new site, I did a Move All. I get the following error when I hit SUBMIT, but as far as I can tell, everything works and all settings and changes I make are updated properly.
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/wbs/extensions/ext.lg_better_meta.php:759) in /home/walkthew/public_html/system/core/core.functions.php on line 296
LGBM: 1.7.0 Commercial EE 1.6.6 MSM 1.1
I thought it might be a problem with this ext enabled on sites I don’t use it (it’s only used on 1), so I went to change the “Enable LG Better Meta extension for this site?” for each of the other sites and got this similar error every time:
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
It looks similar to the problem in this post: http://ellislab.com/forums/viewthread/92071/, but I checked the code and the underscore is not in my version.
I’ve followed the instructions as if I were upgrading the ext by uninstalling and removing the whole shebang and still have the problems.
I also have 4 sites in my MSM.
And I have a separate problem that doesn’t seem to affect anything, but it was a problem even the first time I installed it. I also get an error when viewing the plugin from the utilities page, although the script works, so I don’t think it’s that big a deal:
Unable to load the following plugin: lg_better_meta_php.php
When I select it from the Plugin Manager i get this error “Unable to load the following plugin: lg_better_meta_php.php”
I had the same error. Renaming pi.lg_better_meta_php.php to pi.lg_better_meta_pi.php made the backend error go away..
Not sure how it got renamed to that. Could have been the archiver utility I used.
Sorry if this has been covered, but I can’t find the answer anywhere… Sorry if it’s a silly question. I can see how Better Meta is great for single entry pages. Does it have any functionality for templates displaying multiple entries from the same weblog (e.g. a latest news listing page showing summaries of latest 10 entries)? Obviously in this case there’s no one entry to grab meta data from. In this example, the meta description would most appropriately be something generic like “Latest news stories from the XYZ Corp.” rather than anything pulled from a single News entry. Currently, my solution is always to have a weblog called ‘Index Page Meta’, which contains the meta info for each of my top-level sections, which I then ‘hardcode’ the entry id’s for these into the templates for any ‘multiple entry’ templates. It makes the meta descriptions client-editable. Does LG Better Meta cover this (sort of) hack? Thanks 😊
You can use the title=”” title_prefix=”” title_suffix=”” to achieve what you need for the index pages.
Example:
{exp:lg_better_meta_pi:template}"
title="Blog"
title_suffix="Latest news stories from the XYZ Corp."
}
Which would produce:
<title>Latest news stories from the XYZ Corp. | Blog</title>
Just to say LG Better Meta rocks - thanks, Leevi! As an EE newbie I was setting about creating all sorts of custom fields to do the kinds of things that your extension takes in its stride and does more elegantly. Worth every bit of the $40.
Thanks for your support… Glad you like it!
Ok… I have tried everything and can’t figure this out… How do you get a custom field to display in the sitemap? I have a weblog that contains pdf files. I want them to be included in the sitemap. I have tried all kinds of different combinations, including the ones below. Neither work, I just get a blank where {file} should be.
Send me a PM and I’ll send you an updated plugin file that renders custom fields correctly. This fix will be available in the next release.
I bought LG Better Meta 1.7 but have a bit of a problem. I’ve enabled the extension for just one weblog for now - going into Edit and clicking any entry in that weblog results in a completely blank screen. I’ve narrowed it down to the LG TinyMCE extension (v.1.3.2) I think. Or at least, disabling that extension solves the problem, re-enabling it brings the problem back. I’ve tried disabling other extensions but it’s definitely LG TinyMCE that appears to be the culprit.
Which version of EE and PHP are you running?
When I select it from the Plugin Manager i get this error “Unable to load the following plugin: lg_better_meta_php.php”I had the same error. Renaming pi.lg_better_meta_php.php to pi.lg_better_meta_pi.php made the backend error go away.. Not sure how it got renamed to that. Could have been the archiver utility I used.
The correct name of the file should be: pi.lg_better_meta_pi.php
Are you trying to add standard quotes or curly quotes to your page title?Sheesh, missed this post. They are just standard quotes. Seems like quotes in the description field of an entry don’t get properly escaped or converted. See my thread called “LG Better Meta: Not escaping quotes in descriptions” about that. Also running into issue with apostrophes being passed to the title or title_suffix parameters. I normally do my Better Meta this way, with a simple embed at the top of the template:Then in _pagetop, along with things like the doctype, I have the Better meta plugin:{embed="common/_pagetop" url_title="" entry_id="" title="Features" title_suffix="{segment_2_category_name}"}
In this case I’m using Low’s Seg2Cat extension to get the proper name of the category from segment_2. When that extension returns the category name “Speaker’s Corner” I get the result in the attached pic. I thought it might be Low’s extension, so I assign a variable right on the template, type it in manually, and embed that instead:{exp:lg_better_meta_pi:template entry_id="{embed:entry_id}" url_title="{embed:url_title}" title="{embed:title}" description="{embed:description}" keywords="{embed:keywords}" title_suffix="{embed:title_suffix}" hide_site_title = "{embed:hide_site_title}" }
That works but is not dynamic. So, because I have an real entry for that “Speaker’s Corner” section (so I could apply Better Meta to the landing page) I tried wrapping the embed with the entries tag and passing the title (simplified entries tag here):{assign_variable:testtitle="Speaker's Corner"}
Again, I get the result in the the attached pic, with the entity. So I thought it might be the fact that I’m embedding. So I re-wrote my template so that Better Meta is right on the template (yuk) instead of in my site-wide _pagetop embed.{exp:weblog:entries weblog="feature_categories" dynamic="off" url_title="{segment_2}"} {embed="common/_pagetop" url_title="" entry_id="" title="Features" title_suffix="{title}"} {/exp:weblog:entries}
That also resulted in the entity. Seems like I can’t dynamically pass a variable to the BMeta plugin that has an apostrophe. Should I encode the apostrophe in the category field itself? What if the client adds a new category called “The Monkey’s Banana” - would I have to tell them to encode it?{exp:weblog:entries weblog="feature_categories" dynamic="off" url_title="{segment_2}"} {exp:lg_better_meta_pi:template title="Features" title_suffix="{title}"} {/exp:weblog:entries}
Ok now we have nailed it down to the output of another extension I can dig a little deeper.
On line 106 of Lows extension there is some light typography applied.
$data['segment_'.$ids[$row['cat_url_title']].'_category_name'] = $TYPE->light_xhtml_typography($row['cat_name']);
Can you do a print() before and after that line and post the difference?
If that light typgraphy is the issue it shouldn’t be hard to update lows extension with a disable_typography=”” param.
Currently, my solution is always to have a weblog called ‘Index Page Meta’, which contains the meta info for each of my top-level sections, which I then ‘hardcode’ the entry id’s for these into the templates for any ‘multiple entry’ templates. It makes the meta descriptions client-editable. Does LG Better Meta cover this (sort of) hack?You can use the title=”” title_prefix=”” title_suffix=”” to achieve what you need for the index pages. Example:Which would produce:{exp:lg_better_meta_pi:template}" title="Blog" title_suffix="Latest news stories from the XYZ Corp." }
<title>Latest news stories from the XYZ Corp. | Blog</title>
Hey Levi, thanks for the reply - I’d thought of that, but that doesn’t make the meta data client editable? I might be missing something, it often happens! 😊
I bought LG Better Meta 1.7 but have a bit of a problem. I’ve enabled the extension for just one weblog for now - going into Edit and clicking any entry in that weblog results in a completely blank screen. I’ve narrowed it down to the LG TinyMCE extension (v.1.3.2) I think. Or at least, disabling that extension solves the problem, re-enabling it brings the problem back. I’ve tried disabling other extensions but it’s definitely LG TinyMCE that appears to be the culprit.Which version of EE and PHP are you running?
EE 1.6.6 (20081114) / PHP 5.1.6
Ryan and Leevi, forgive me for intruding and for not reading the entire thread, but as far as I can see, this is what’s happening. Category name is:
Speaker's Corner
Low_seg2cat applies light typography, changing the apostrophe into a curly quote:
Speaker’s Corner
This shouldn’t be a problem for <title>-tags; HTML-entities should be displayed as per usual. By the looks of your screen grab, the curly quote entity has been ‘entified’ itself, changing the ampersand into a HTML-entity:
Speaker’s Corner
or
Speaker/#8217;s Corner
Ryan, what is the source code of the final output?
Hey Low, That’s exactly where I was going with it…outputs:print(htmlentities(html_entity_decode("’")));
Any suggestions on turning the whole string into its original characters before preforming html_entities()?&#8217;
Try this:
print(htmlentities(html_entity_decode("That’s the question", ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8'));
Should output:
That’s the question
Like it says on php.net:
The ISO-8859-1 character set is used as default for the optional third charset
Changing it to UTF-8 appears to solve some stuff… Guess we can be happy it isn’t affected by DST. 😉
When I select it from the Plugin Manager i get this error “Unable to load the following plugin: lg_better_meta_php.php”
I’m getting the same error, and the plugin file is definitely named lg_better_meta_pi.php. Have deleted and reuploaded all files and I continue to get the same error.
I also got a transient “headers already sent” error when saving the extension’s settings, but that didn’t seem to affect much: settings were saved correctly.
I’m running the current build of Expression Engine.
I just purchased Better Meta and it’s working everywhere except on the page of a single entry. I somehow can’t get the title, description and keywords from an entry to show. Is there a special tag that should be used? Could someone post an example of how the entry tag is supposed to look? Thanks in advance. 😊
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.