nicoknoll / markupseo Goto Github PK
View Code? Open in Web Editor NEWThe all-in-one SEO solution for ProcessWire.
The all-in-one SEO solution for ProcessWire.
As stated in https://developers.facebook.com/docs/sharing/webmasters#markup, the Facebook Open Graph requires meta tags with property attribute instead of name.
I solved the problem adding a simple check when rendering the module in order to output the correct markup in case of og: tags.
Long SEO url's wrap onto next line, covering page description.
See this page for picture:
https://processwire.com/talk/topic/8007-markupseo-the-all-in-one-seo-solution-for-processwire/page-7
Entering a custom tag such as:
<meta name="google-site-verification" content="XXX">
Produces:
<meta name="custom" content="<meta name="google-site-verification" content="XXX">">
Adding "continue" fixes the issue.
$rendered = '';
foreach(array_filter($mixedData) as $name => $content) {
if($name == 'custom') continue;
if($name == 'robots') $content = implode(', ', $content);
$rendered .= '<meta name="'.$name.'" content="'.$content.'">'."\n";
}
I'm not getting an SEO tab appear on my publish/edit pages (I have specified templates to get the tab in the module's settings). So I thought I should maybe uninstall and reinstall, but when I try to uninstall I get:
Recoverable Fatal Error: Argument 1 passed to Fields::___delete() must implement interface Saveable, null given (line 265 of /wire/core/Fields.php)
Or are there some other set-up steps I've missed?
I noticed when using PHP 7.2, I get the following error:
PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../wwwroot/site/modules/MarkupSEO/MarkupSEO.module:245
A similar issue was recently fixed with the TracyDebugger module at adrianbj/TracyDebugger#13. There is also discussions for Processwire at processwire/processwire-issues#408
Hi, I noticed that the "image" and "OG:image" tags only output the filename, not the full path.
Examples:
<meta name="image" content="maxresdefault.jpg">
<meta property="og:image" content="maxresdefault.jpg">
I use the image field on the SEO tab that was supplied with the module and automatically include the tags in the header.
Module version 0.8.7, PW version 3.0.118
Hi Nico, when changing a template for a page, I get this sometimes:
Notice: Trying to get property of non-object in /.../site/modules/MarkupSEO/MarkupSEO.module on line 101
(The old template was in the list of templates in the SEO module settings, the new template not)
Hi Nico,
Would it be easy to add a check in the title generation to NOT add the sitename to the title redundantly?
My title format string is "{title} - {sitename}", and my sitename is "AnswerHub". It would be super cool if there was a way to add no-repeat into the format, so it would only add the sitename if it wasn't already in the title string.
Another option might just be to let the page have a title format override checkbox to skip the title format and just use the entered string exactly. Since lots of people won't necessarily be using the same title format string, this would be a more reliable and simple way to give absolute certainty.
Best,
Rick
To reproduce: Install MarkupSEO, Install ProcessDatabaseBackups, Create a Backup (Setup -> DB Backups -> Create a Backup, Submit) and try to select it from the list of available backups.
The following error is thrown:
Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in <path>\wire\core\Selectors.php line 247)
#0 <path>\wire\core\Selectors.php(284): Selectors->create('0', '', ':dumpname.sql')
#1 <path>\wire\core\Selectors.php(81): Selectors->extractString('0:dumpname.sql')
#2 <path>\wire\core\Pages.php(175): Selectors->__construct('0:dumpname.sql')
#3 [internal function]: Pages->___find('0:dumpname.sql', Array)
#4 <path>\wire\core\Wire.php(389): call_user_func_array(Array, Array)
#5 <path>\wire\core\Wire.php(344): Wire->runHooks('find', Array)
#6 <path>\wire\core\Pages.php(270): Wire->__call('find', Array)
#7 <path>\wire\core\Pages.php(270): Pages->find('0:dumpname.sql', Array)
#8 <path>\wire\core\Pages.php(285): Pages->findOne('0:dumpname.sql')
#9 <path>
Invalid output validator
example error:
Bad value og:site_name for attribute name on element meta: Keyword og:site_name is not registered.
I was not getting the "meta name=canonical" tag to be recognized by a popular SEO extension I use, so I located the part of the MarkupSEO module that emits and made a simple change around line 340 in MarkupSEO.module:
// add "render"
$rendered = '';
foreach($pageData as $name => $content) {
if($name == 'custom') {
continue;
}
if($name == 'title') {
if($this->titleFormat == '') continue;
$rendered .= '<title>'.$this->parseTitle($page, $content).'</title>'.PHP_EOL;
continue;
}
if($name == 'canonical') {
$rendered .= '<link rel="canonical" href="'.$content.'">'.PHP_EOL;
continue;
}
$rendered .= '<meta name="'.$name.'" content="'.$content.'">'.PHP_EOL;
}
Now the canonical reference is correctly recognized by the SEO checker I was using.
Hi Nico
As requested on the forums, please consider ability to set a NOFOLLOW or NOINDEX on a per-page basis to over-ride the default Robots settings.
Thanks :)
Hi Nico, I see this link with the 070 version:
<meta name="canonical" content="httpss://... (double "s")
Love this module!
A great feature would be the possibility to set a default title format for a template.
Hi,
I am trying to autofill the Image field on the SEO tab based on the image uploaded into the content tab.
I tried var_dumping the $event to see if I could extract the data (image) from there but i am unable to find it.
Does this seem like something that is even possible?
I think it would be nice if Robots, Include Generator and Include Open Graph would have 1 or 2 descriptive sentences to show what they are about.
Nico, great module!
It would be nice to have an option of placing Piwik code at the bottom of the page, right before the closing BODY tag to prevent script blocking.
Thanks
For several years now, the keywords tag is no longer used by search engines to index pages. Worse, some tests even show that this can be a penalty...
To avoid confusion, it would be nice if this field disappears MarkupSEO which is otherwise very good!
At least, if the field is not filled then the meta-tag is not generated ...
Thanks in advance
Hello Nico,
First of all, thank you for this great module. Very helpfull and handy.
Maybe you allready read this issue on the ProCache forum but I'll inform you anyway.
When using MarkupSEO in combination with ProCache the meta tags are removed.
Ryan suggested a solution that works.
https://processwire.com/talk/topic/11835-procache-with-markupseo-removes-all-meta-tags/
Alfred
I tried to use my own field (title_window, string field) as source for the title tag:
{title_window} - {sitename}
That does not work, what I get is this:
<title>{title_window} | MyCompany</title>Is this intended?
Hi Nico
As per the forums, a few users reporting issues with upgrades to PW3.0.4X
In my case the META tags don't render at all.
I'm using <?php echo $page->seo->render;?>
Any idea when you could look at this?
Hi there, I noticed what I think is a bug. It seems like MarkupSEO doesn't respect the "Should page URLs end with a slash?" template setting. I don't like having the trailing slash on the end of my urls.
I noticed MarkupSEO outputs the following:
When the actual url of the page is http://mywebsite.dev/support-us/donateI also noticed the "Google preview" under the SEO tab when editing the page doesn't respect the template setting either. The Google preview always ends with a slash.
I'm not sure how to fix it, but I thought I would report it anyways.
Custom tags are not working on a windows server (IIS).
Specifically, the command PHP_EOL
is not working on line 426 in MarkupSEO.module:
private function parseCustom($custom) {
if(trim($custom) == '') return;
$return = '';
$lines = explode(PHP_EOL, $custom);
foreach($lines as $line) {
list($key, $value) = explode(':=', $line);
$key = preg_replace('%[^A-Za-z0-9\-\.\:\_]+%', '', str_replace(' ', '-', trim($key)));
$value = trim(wire('sanitizer')->text(html_entity_decode($value)));
$return[$key] = $value;
}
return $return;
}
I changed the delimiter from PHP_EOL
to \n
and it is now working.
Working code:
private function parseCustom($custom) {
if(trim($custom) == '') return;
$return = '';
$lines = explode("\n", $custom);
foreach($lines as $line) {
list($key, $value) = explode(':=', $line);
$key = preg_replace('%[^A-Za-z0-9\-\.\:\_]+%', '', str_replace(' ', '-', trim($key)));
$value = trim(wire('sanitizer')->text(html_entity_decode($value)));
$return[$key] = $value;
}
return $return;
}
I didn't test this on other systems but apparently there are common issues with PHP_EOL
source: https://stackoverflow.com/questions/5508454/how-to-resolve-php-php-eol-issue
Refer: #99, MarkupSEO
In order to ensure that the <title>
and og:title
differ, I should be able to use my own <title>
tags.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.