Jump to content
Nico Knoll

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

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

Share this post


Link to post
Share on other sites

@Nico

Any updates planned to fix the problem when FormBuilder is installed?

I can just uninstall MarkupSEO for the mo but it's a great module. Would love to have it functioning  :rolleyes:

Share this post


Link to post
Share on other sites

I'am trying to validate html5 and get errors on metatags. Is there a solution for this? 

Bad value og:site_name for attribute name on element meta: Keyword og:site_name is not registered. 

Share this post


Link to post
Share on other sites

Could you add this as an issue on github? And what site_name have you defined in the module's settings?

Share this post


Link to post
Share on other sites

@ 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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Nice module :)

It looks like Piwik isn't integrated yet?

Will you write some more documentation and usage tips to the readme file and / or the descriptions?

Share this post


Link to post
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

Share this post


Link to post
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.

  • Like 5

Share this post


Link to post
Share on other sites

On my own standard profile I have og type and twitter type as page fields so that I can also add new variations on the fly - especially useful with open graph as there are so many potential content types. 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Great idea, as that pagelimit was a real showstopper. Is there somewhere a full list of the fields this module generates as i would like  to implement this as a standard into my templates. 

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Great Work !!!!

Small bug?

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 92

Share this post


Link to post
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!!! 

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gebeer
      I am happy to present my new fieldtype FieldtypeImageFromPage. It is made up of 2 modules:
      Fieldtype Image Reference From Another Page is a Fieldtype that stores a reference to a single image from another page. The image can be selected with the associated Inputfield.
      Inputfield Select Image From Page is an Inputfield to select a single image from images on a predefined page and it's children.
      And there also is a helper module that takes care of cleanup tasks.
      This module evolved out of a discussion about my other Module FieldtypeImagePicker.  It caters for use cases where a set of images is being reused multiple times across a site. With this fieldtype these images can be administered through a chosen page. All images uploaded to that page will be available in the inputfield.
      When to use ?
      Let editors choose an image from a set of images that is being used site-wide. Ideal for images that are being re-used across the site.
      Suited for images that are used on multiple pages throughout the site (e.g. icons).
      Other than the native ProcessWire images field, the images here are not stored per page. Only references to images on another page are stored. This has several advantages:
      one central place to organize images when images change, you only have to update them in one place. All references will be updated, too. (Provided the name of the image that has changed stays the same) Features
      images can be manipulated like native ProcessWire images (resizing, cropping etc.) image names are fully searchable through the API orphaned references to images that get deleted are automatically removed. When you delete an image from one of the pages that hold your site-wide images, all pages that use this fieldtype will be searched. If any page contains a reference to the image you just deleted, that reference will be reset. You will get warning messages to edit those pages and add new image references there. How to install and setup
      Download and install this module like any other modules in ProcessWire Create a page in the page tree that will hold your images. This page's template must have an images field Upload some images to the page you created in step 2 Create a new field. As type choose 'Image Reference From Another Page'. Save the field. In 'Details' Tab of the field choose the page you created in step 2 Click Save button Choose the images field name for the field that holds your images (on page template from step 2) Click Save button again Add the field to any template You are now ready to use the field View of the inputfield on the page edit screen:

      View of the field settings

      The module can be installed from this github repo. Some more info in the README there, too.
      In my tests it was fairly stable. After receiving your valued feedback, I will eventually add it to the modules directory.
      My ideas for further improvement:
      - add ajax loading of thumbnails
      Happy to hear your feedback!
       
    • By gebeer
      Although the PW backend is really intuitive, ever so often my clients need some assistance. Be it they are not so tech savvy or they are not working in the backend often.
      For those cases it is nice to make some help videos available to editors. This is what this module does.
      ProcessHelpVideos Module
      A Process module to display help videos for the ProcessWire CMS. It can be used to make help videos (screencasts) available to content editors.
      This module adds a 'Help Videos" section to the ProcessWire backend. The help videos are accessible through an automatically created page in the Admin page tree. You can add your help videos as pages in the page tree. The module adds a hidden page to the page tree that acts as parent page for the help video pages. All necessary fields and templates will be installed automatically. If there are already a CKEditor field and/or a file field for mp4 files installed in the system, the module will use those. Otherwise it will create the necessary fields. Also the necessary templates for the parent help videos page and it's children are created on module install. The module installs a permission process-helpvideos. Every user role that should have access to the help video section, needs this permission. I use the help video approach on quite a few production sites. It is stable so far and well received by site owners/editors. Up until now I installed required fields, templates and pages manually and then added the module. Now I added all this logic to the install method of the module and it should be ready to share.
      The module and further description on how to use it is available on github: https://github.com/gebeer/ProcessHelpVideos
      If you like to give it a try, I am happy to receive your comments/suggestions here.
    • By Robin S
      A module created in response to the topic here:
      Page List Select Multiple Quickly
      Modifies PageListSelectMultiple to allow you to select multiple pages without the tree closing every time you select a page.
      The screencast says it all:

       
      https://github.com/Toutouwai/PageListSelectMultipleQuickly
      https://modules.processwire.com/modules/page-list-select-multiple-quickly/
    • By gebeer
      Hello all,
      sharing my new module FieldtypeImagePicker. It provides a configurable input field for choosing any type of image from a predefined folder.
      The need for it came up because a client had a custom SVG icon set and I wanted the editors to be able to choose an icon in the page editor.
      It can also be used to offer a choice of images that are used site-wide without having to upload them to individual pages.
      There are no image manipulation methods like with the native PW image field.
      Module and full description can be found on github https://github.com/gebeer/FieldtypeImagePicker
      Kudos to @Martijn Geerts. I used his module FieldTypeSelectFile as a base to build upon.
      Here's how the input field looks like in the page editor:

      Hope it can be of use to someone.
      If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Eventually this will go in the module directory soon, too.
    • By bernhard
      @Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
      Description from PW Weekly:
       
      Modules Directory: https://modules.processwire.com/modules/rock-pdf/
      Download & Docs: https://github.com/BernhardBaumrock/RockPDF
       
      You can combine it easily with RockReplacer: 
      See also a little showcase of the RockPdf module in this thread:
       
×
×
  • Create New...