Jump to content

MarkupSEO - The all-in-one SEO solution for ProcessWire.


Nico Knoll

Recommended Posts

I'm pretty sure MarkupSEO is causing issues when viewing form results generated by FormBuilder.

I posted the issue in the Form Builder Support but in case anyone isn't a member (VIP forum), here's the details.

Error on viewing FormBuilder entries

Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php line 247)

#0 /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php(284): Selectors->create('1.2', '', '')
#1 /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php(81): Selectors->extractString('1.2')
#2 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(165): Selectors->__construct('1.2')
#3 [internal function]: Pages->___find('1.2', Array)
#4 /home/sites/pretendy-url.com/public_html/wire/core/Wire.php(389): call_user_func_array(Array, Array)
#5 /home/sites/pretendy-url.com/public_html/wire/core/Wire.php(344): Wire->runHooks('find', Array)
#6 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(260): Wire->__call('find', Array)
#7 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(260): Pages->find('1.2', Array)
#8 /home/sites/pretend
This error message was shown because you are logged in as a Superuser. Error has been logged. 

Ryan's suggestion

Peter, I've looked at the site with the info you provided and was able to duplicate it there. But importing the form locally and testing here, I can't duplicate it. Unfortunately the debug backtrace error message we've got is truncated for some reason, so we can't see the full picture or pin it to a specific module. However, we can see that the exception is coming from a $pages->find("1.2"); operation. Since I can't duplicate it locally, and because FormBuilder doesn't do any $pages->find(), it's very likely that one of the other modules you've got installed (under Site) is monitoring the "id" property in the URL, thinking it's a page ID. If you can, I would start uninstalling modules one by one and testing your Entries screen, to determine which module it is. It's no doubt got to be an "autoload" module. If I can get FTP or SSH access to the server, I could track it down for you by doing a grep on the site modules directory. 

Uninstalling MarkupSEO makes the FB entries viewable again.

  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...

@ Nico:

I did some research for validation. Found a solution for html5 tags. Could you take a look at this please?

http://help.simplytestable.com/errors/html-validation/bad-value-w-for-attribute-x-on-element-y-z/bad-value-twittertitle-for-attribute-name-on-element-meta-keyword-twittertitle-is-not-registered/

Swap the name attribute for an otherwise-identical property attribute to create valid syntax
Link to comment
Share on other sites

I'm pretty sure MarkupSEO is causing issues when viewing form results generated by FormBuilder.

I posted the issue in the Form Builder Support but in case anyone isn't a member (VIP forum), here's the details.

Error on viewing FormBuilder entries

Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php line 247)

#0 /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php(284): Selectors->create('1.2', '', '')
#1 /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php(81): Selectors->extractString('1.2')
#2 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(165): Selectors->__construct('1.2')
#3 [internal function]: Pages->___find('1.2', Array)
#4 /home/sites/pretendy-url.com/public_html/wire/core/Wire.php(389): call_user_func_array(Array, Array)
#5 /home/sites/pretendy-url.com/public_html/wire/core/Wire.php(344): Wire->runHooks('find', Array)
#6 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(260): Wire->__call('find', Array)
#7 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(260): Pages->find('1.2', Array)
#8 /home/sites/pretend
This error message was shown because you are logged in as a Superuser. Error has been logged. 

Ryan's suggestion

Uninstalling MarkupSEO makes the FB entries viewable again.

I had the same issue with ProcessDatabaseBackups. See the related github issue: https://github.com/NicoKnoll/MarkupSEO/issues/4

Link to comment
Share on other sites

@ Joss: Thx, but validation is now ok!

I changed this line in MarkupSEO.module

$rendered .= '<meta name="'.$name.'" content="'.$content.'">'."\n\r";

into

$rendered .= '<meta property="'.$name.'" content="'.$content.'">'."\n\r";

  • Like 1
Link to comment
Share on other sites

So I think I'm going to change MarkupSEO back to creating "real" fields. This will allow multilanguage and has some other benefits as this module is used by a lot of you lately.

This is a good idea Nico especially also whenyou have lots of pages which use MarkupSEO. And Multilanguage is a must for modern SEO in Asia. Thanks!

  • Like 1
Link to comment
Share on other sites

At the moment it will create the following fields:

  • seo_tab
  • seo_tab_END
  • seo_title
  • seo_keywords
  • seo_description
  • seo_custom
  • seo_image

Maybe there are one or two fields that will follow.


And it's going to be expandable. So each field starting with seo_ will be interpreted as extension. More to this when the new version is finished

Link to comment
Share on other sites

Just for interest, the fields I use in my sites are:

Title - for the specific page title

Meta Description (which is also used by og:description and twitter:description)

Meta Author 

Google Profile address

Business G+ profiles (which might be different)

A featured image (that is resized as a square on the template)

Twitter name

Twitter Card (page field)

Open Graph Type (page field)

Both the last two have create new options.

I am also thinking of adding bits for Schema, since those are also relevant to SEO, but obviously, if you added those, then people would have to manually add the relevant reference to their templates.

Link to comment
Share on other sites

Hmm.... reinstalled this module and got quite a few questions ...

1. In Module settings

1.1  "Include Generator" , what does this setting do ?

1.2  "Do you want to get the generated code included automatically or use hooks in your template files?"

What exactly does this do on automatic setting ?

In manual setting you are expected to add the fields manually in your template or are there any other hooks ?

1.3 The "custom" field does this has any form of safety or does this allow to simply inject anything you like into the template head?

(If it would allow to inject anything this still is only a minor security risk as the person who is setting this needs access to mudule settings and is able to install own custom modules.)

1.4 Maybe a switch for automatic redirect to https would be nice as i just read that Google  starts to prefer HTTPS Pages.

http://googlewebmastercentral.blogspot.de/2014/08/https-as-ranking-signal.html

http://www.golem.de/news/hsts-google-fuehrt-liste-von-reinen-https-seiten-1408-108531.html

http://www.spiegel.de/netzwelt/web/google-belohnt-https-verbindungen-im-ranking-a-984872.html

Just an idea?

2. In page seo settings.

2.1 Warning:

in_array() expects parameter 2 to be array, string given in /home/p4a/domains/009.pw4all.org/public_html/site/modules/MarkupSEO/MarkupSEO.module on line 76

2.2 Maybe an Image field for the image ? But i really have no idea for what reason there is a Image field in SEO settings of a page ?

2.3 Again the custom field , if its only meaned for metas maybe a small repeater woudl do the job better ? Or maybe at least add some Regex filter to stop the average writer from adding  unlimited Javascript into ths page.? 

Edit:

Ist just an idea but i have often seen an underscore added to tab fields like  _seo  and _seo_END so you can see its a tab field on first view  again, just an idea.

Link to comment
Share on other sites

Hey,

new version is almost finished and is going to be released in an hour I guess.

Most of your issues should be solved in this :)

And the image field is used for open graph and twitter cards.

And I normally do _stuff for tabs to but I thought it might be a little bit better to have the same schema for all of the seo fields that get generated automatically (and it's easier to delete them afterwards)

  • Like 1
Link to comment
Share on other sites

Update 0.5.0: 

This version is not compatible with further releases (and still beta).

https://github.com/NicoKnoll/MarkupSEO/blob/master/MarkupSEO.module

I did a lot of changes and almost wrote the complete code new. Here are some main changes:

  • Use normal fields instead of custom solution (this allows multilanguage and may prevents some compatibility problems)
  • Added Twitter Cards
  • Added an "Author" option
  • Added a "title format" option (and a way to disable auto include of title)
  • Rewrote most of fields descriptions
  • Custom meta tags have to have a special format now + sanitizer for security (it's self explaining in the module itself)
  • Fixed all issues
  • You have to choose which templates should have a SEO tab instead of excluding now

Let me hear what you think. And merry christmas :)

  • Like 3
Link to comment
Share on other sites

I would like to do a request. Is it possible to remove the line breaks? 

<title>titel</title><meta name="keywords" content="voorbeeld, voorbeeld, voorbeeld">

<meta name="description" content="Dit is de omschrijving">

<meta name="image" content="">

<meta name="canonical" content="http://www.testpagina/">

<meta name="generator" content="ProcessWire 2.5.3">

<meta name="author" content="">

<meta name="robots" content="index, follow">

<meta name="og:site_name" content="">

<meta name="og:title" content="titel">

<meta name="og:url" content="">

<meta name="og:description" content="Dit is de omschrijving">

<meta name="og:type" content="website">

<meta name="og:image" content="">

<meta name="twitter:card" content="summary">

<meta name="twitter:site" content="@">

<meta name="twitter:title" content="titel">

<meta name="twitter:url" content="">

<meta name="twitter:description" content="Dit is de omschrijving">

<meta name="twitter:image" content="">
  • Like 1
Link to comment
Share on other sites

About global custom field.

A while ago i had some trouble whith google indexing HTML entities in my meta Descriptions rigth as that.

So when i loocked at google search results i was looking at some ü> and a few other.

I am not sure if this is still an issue as i don't do much SEO right now but if it is i guess we schould use a regex

filter that only allows word characters and a few choosen special chars and simply drops all other.

And again maybe its an option to make the global custom field whithout filter as it can be only edited by an admin.

What i did not test yet was if the global field is overridden by the page based one or if both are concatenated?

About image field in page SEO :

Is there a reason why this is still no Imagefield ? Maybe i missed something ?

About page SEO:

maybe add a field  for a per page Robots setting? This is no must have , but would make it almost feature complete :-)

Google Preview :

What do i have to do to get a google prewiew displayed ?

And again, great work, i love it!!! 

Link to comment
Share on other sites

Version 0.6.0:

  • Big feature: Google suggestion autocomplete
  • Google preview updates while you type
  • Custom contents only get sanitized now
  • Bugfixes

@NorbertH: This is not an image field because you can't have an image field in the modules config settings page. And I think this is good enough for now. Maybe I change my mind later on :)

@toothpaste: Why no line breaks?

  • Like 2
Link to comment
Share on other sites

@NorbertH: This is not an image field because you can't have an image field in the modules config settings page. And I think this is good enough for now. Maybe I change my mind later on  :)

Sorry, simply did not know that you cannot have Image fields in module config ...

As Google handles each subpage of a site as a seperate page (you often can see subpages ranking much better than the main page at least at a speciffic topic ) it may be a good Idea to have this image setting in the page speciffic settings  and use the one set on the home page as default maybe? 

Same goes for the Robot settings where user want to exclude certain pages or areas .

@toothpaste: Why no line breaks?

I guess hes is talking about the double linebreaks which look ugly and makes HTML source harder to read.

Personallly i would even prefer to add some tabs before the actual tags to have a propper formating of HTML source :

<head>
​    <title>titel</title><meta name="keywords" content="voorbeeld, voorbeeld, voorbeeld">
 
    <meta name="description" content="Dit is de omschrijving">
    <meta name="image" content="">
    <meta name="canonical" content="[url=http://www.testpagina/]http://www.testpagina/">[/url]
    <meta name="generator" content="ProcessWire 2.5.3">
    <meta name="author" content="">
    <meta name="robots" content="index, follow">
    <meta name="og:site_name" content="">
    <meta name="og:title" content="titel">
    <meta name="og:url" content="">
    <meta name="og:description" content="Dit is de omschrijving">
    <meta name="og:type" content="website">
    <meta name="og:image" content="">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@">
    <meta name="twitter:title" content="titel">
    <meta name="twitter:url" content="">
    <meta name="twitter:description" content="Dit is de omschrijving">
    <meta name="twitter:image" content="">
...
</head>
​
 

Last thing i found was a bunch of notices  while saving the page settings:

Notice: Undefined variable: page in [/size]/home/p4a/domains/009.pw4all.org/public_html/site/modules/MarkupSEO/MarkupSEO.module on line [/size]137

Notice: Trying to get property of non-object in [/size]/home/p4a/domains/009.pw4all.org/public_html/site/modules/MarkupSEO/MarkupSEO.module on line [/size]137

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...