MetaMax Module Observations
MetaMax Module Observations
Using {MetaMax} to control everything before the opening </__body> tag in a template is a great simplifying tool. As I notice issues I will make comments here, and I hope others will to.
Report bugs in the forge: http://dev.cmsmadesimple.org/bug/list/1077
Report bugs in the forge: http://dev.cmsmadesimple.org/bug/list/1077
Last edited by Owens on Thu Jan 26, 2012 9:36 pm, edited 1 time in total.
Re: MetaMax MicroTiny Applying Styles in WYSIWYG Area
MicroTiny applying styles
Problem: MicroTiny will not apply styles in the WYSIWYG editor if using MetaMax to inject the {cms_stylesheet} tag.
Solution: Add a line to your template that says:
This will allow MicroTiny access to your style sheet in the WYSIWYG editor in the CMSMS admin.
Problem: MicroTiny will not apply styles in the WYSIWYG editor if using MetaMax to inject the {cms_stylesheet} tag.
Solution: Add a line to your template that says:
Code: Select all
{capture}{cms_stylesheet}{/capture}
Re: MetaMax Pages Without Text
Pages without text
Problem: Pages without text, for example a page that has a single {Gallery} tag in the content area, may show the following error:
Solution: Add some text to the content area that MetaMax can use to auto generate descriptions and keywords.
Problem: Pages without text, for example a page that has a single {Gallery} tag in the content area, may show the following error:
Code: Select all
Warning: Invalid argument supplied for foreach() in ../modules/MetaMax/action.default.php on line 50
Warning: array_diff() [function.array-diff]: Argument #1 is not an array in ../modules/MetaMax/action.default.php on line 75
Warning: array_diff() [function.array-diff]: Argument #1 is not an array in ../modules/MetaMax/action.default.php on line 76
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: MetaMax Module Observations
You should probably file a bug report.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: MetaMax Module Observations
I have indeed filed the report to Oliver [the MetaMax project admin] but I also wanted to share the information here, to be as helpful to the community as possible.calguy1000 wrote:You should probably file a bug report.
-
- Forum Members
- Posts: 89
- Joined: Thu Aug 21, 2008 11:47 am
Re: MetaMax Module Observations
I haven't been able to replicate this warning/error but have wrapped the lines in if statements so they only get applied if there is content. If you could try version 1.6.5 and let me know if it prevents you having to use your workaround it would be greatly appreciated.Owens wrote:I have indeed filed the report to Oliver [the MetaMax project admin] but I also wanted to share the information here, to be as helpful to the community as possible.calguy1000 wrote:You should probably file a bug report.
I'm glad your finding the module useful and appreciate your assistance bug finding and fixing and ideally there would be a module wiki which I could associate with my module, save having to post in the forum and it getting lost over time.
Could this be an addition to the CMSMS wiki section?
But for the time being I'll use this forum.
My CMSMS tip is to capture all your content blocks at the top of your templates and then call {MetaMax} then just insert your captured variables into your template where you need them.
e.g
Code: Select all
{capture assign='pageContent'}{content}{/capture}
{if !isset($pagetitle)}
{capture assign='pagetitle'}{title}{/capture}
{/if}
{MetaMax}
</__body>
<h1>{$pagetitle}</h1>
{$pageContent}
<__body>
</__html>
Re: MetaMax Module Observations
In addition to the observations above:
1. Although "Generate Doctype tag:" is clicked, none is created.
2. Keywords in combination with CGBlog, any suggestion on how to pick the keywords used in an article?
I installed Metamax on http://www.uisge-beatha.eu
Gregor
1. Although "Generate Doctype tag:" is clicked, none is created.
2. Keywords in combination with CGBlog, any suggestion on how to pick the keywords used in an article?
I installed Metamax on http://www.uisge-beatha.eu
Gregor
-
- Forum Members
- Posts: 89
- Joined: Thu Aug 21, 2008 11:47 am
Re: MetaMax Module Observations
Hi, I'm currently working on how to get the keywords and descriptions out of non-content blocks so will hopefully have an updated version on it's way soon to solve your first issue.
The second one is quite strange. I have just looked at your page source and what is being output doesn't look like MetaMax is creating it.
Can you post your template code, or at least the <head> stuff?
Thanks
The second one is quite strange. I have just looked at your page source and what is being output doesn't look like MetaMax is creating it.
Can you post your template code, or at least the <head> stuff?
Thanks
Re: MetaMax Module Observations
Thanks for you quick reply. Already looking forward to the next version 
The head currently looks like:
This string
Thanks, Gregor

The head currently looks like:
Code: Select all
{capture assign='get_content'}{content}{/capture}
{if !isset($pagetitle)}
{capture assign='pagetitle'}{title}{/capture}
{/if}
{metadata}
{strip}
{process_pagedata}
{*<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" xmlns:addthis="">*}
{/strip}
<head>
{cms_stylesheet}
{* This is how all the stylesheets attached to this template are linked to * }
{if isset($canonical)}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if *}
{if $canonical != ''}
{* detail pagina mobiel http://m.xxx.nl/log/99/munge_string_to_url_title/ *}
{* canonical = http://www.xxx.nl/blog/99/munge_string_to_url_title/ *}
<link rel="canonical" href="{$canonical}" />
{elseif $page_name == 'lbjaar'}
{* index pagina mobiel www.m.xxx.nl/blog/ *}
<link rel="canonical" href="http://www.uisge-beatha.eu/logboek/" />
{/if}
{* 28nov11 use strip to get rid of whitespace -- http://www.i-do-this.com/blog/48/Put-your-CMSMS-Metatags-on-autopilot *}
{*strip} { * use strip to get rid of whitespace * }
{content assign="get_content"}
{if !isset($get_title)}
{title assign='get_title'}
{/if}
{/strip*}
<title>
{$get_title} - {sitename}
</title>
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}
{tracewatch}
{*SEOTools2*}
{*autometa*}
{*metadata*}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}
{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
{*Relational links for interconnections between pages, good for accessibility and Search Engine Optmization*}
{global_content name='UB_head_js'}
{capture assign="metadescription"}{content block="metadescription" wysiwyg='false' default=''
label='Meta Description' rows='4'
description='Logboek van zeilboot Uisge Beatha, beschrijving van tochten, ervaringen en klussen die aan mijn Hanse 311 door mij worden of zijn gedaan.'}{/capture}
{CGFeedMaker action='autodiscovery' feed='logboek'}
{analitics urchin="UA-3361592-1"}
</head>
I added to "Extra HTML tag content:"<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" xmlns:addthis="">
Thanks, Gregor
-
- Forum Members
- Posts: 89
- Joined: Thu Aug 21, 2008 11:47 am
Re: MetaMax Module Observations
I can't see any calls to {MetaMax} in that template, just the default {metadata} call.
Re: MetaMax Module Observations
OMG 
Changed it. Thanks.
Just saw a stylesheet is not loaded. have to look into it (Menu -> Fotoos)

Changed it. Thanks.
Just saw a stylesheet is not loaded. have to look into it (Menu -> Fotoos)
Re: MetaMax Module Observations
Figured out the stylesheet issue. I had a stylesheet attached to an Album-template, so it would only load if a visitor enters one of the Albums, however for some unknown reason the stylesheet is not loaded in combination with {MetaMax}. If I attach the stylesheet to the template, than the Albums are shown correct. Like I said, don't why it acts that way.
Re: MetaMax Module Observations
Getting there
If I add between <__body> and </__html> than in the page source I see "paginabeschrijving" being added <meta name="description" content="Foto's van zeiltochten in binnenland en buitenland" /> however "Metadata" is not added to <meta name="keywords" content="watersport, zeilen" />.
Link to 'test page' http://www.uisge-beatha.eu/fotoalbum/zeiltochten.html
Any idea?

Code: Select all
{capture}{content block='Paginabeschrijving' oneline='true' wysiwyg='false'}{/capture}
{capture}{content block='Metadata' wysiwyg='false'}{/capture}
Link to 'test page' http://www.uisge-beatha.eu/fotoalbum/zeiltochten.html
Any idea?
-
- Forum Members
- Posts: 89
- Joined: Thu Aug 21, 2008 11:47 am
Re: MetaMax Module Observations
The Metadata content block is there to enable page specific metadata. For example if one page requires a Javascript call and you don't need it to appear on every page you can specify it in the Metadata content block set up like you have.
The keywords are automatically generated depending on the page content, currently these are only take from text appearing in the main page content block. You can tweak the keyword parameters until you see the right type, quantity, length of keywords your after.
To be honest though the keywords meta tag isn't really used and I tend to use it as more of an analysis tool to check my site content has enough relevant keywords in the copy as this is far more likely to help your SEO than forcing non relevant terms into your pages. So if your not seeing the keywords you want then I'd start with looking at your site content and make sure those terms are appearing there first.
The keywords are automatically generated depending on the page content, currently these are only take from text appearing in the main page content block. You can tweak the keyword parameters until you see the right type, quantity, length of keywords your after.
To be honest though the keywords meta tag isn't really used and I tend to use it as more of an analysis tool to check my site content has enough relevant keywords in the copy as this is far more likely to help your SEO than forcing non relevant terms into your pages. So if your not seeing the keywords you want then I'd start with looking at your site content and make sure those terms are appearing there first.
-
- Forum Members
- Posts: 89
- Joined: Thu Aug 21, 2008 11:47 am
Re: MetaMax Module Observations
I have also noticed your source is a bit messed up, you have two <title> calls, one generated by MetaMax and there must be another in your template or something similar. Your metadata is currently sitting outside of you <head> tags too, again these calls must be being set outside of MetaMax.
I would suggest adding your JS calls to the MetaMax additional content block under the HTML tag settings tab and selecting the generate opening and closing head tags checkboxes.
You can then add your Analytics tracking code via MetaMax too by adding your Analytics ID, UA-3361592-1 to the web property ID input area under the Analytics Account settings tab and choosing the type of analytics your needing from the drop down, I tend to choose multiple top level domains.
I would suggest adding your JS calls to the MetaMax additional content block under the HTML tag settings tab and selecting the generate opening and closing head tags checkboxes.
You can then add your Analytics tracking code via MetaMax too by adding your Analytics ID, UA-3361592-1 to the web property ID input area under the Analytics Account settings tab and choosing the type of analytics your needing from the drop down, I tend to choose multiple top level domains.