Jump to content
Wanze

SeoMaestro

Recommended Posts

On 11/1/2019 at 7:33 AM, titanium said:

Somebody mentioned that earlier in this thread, but no solution was proposed (the error went away automagically in that case). 

Problem didn't go away for me. It still exists and no solution found. Turned off sitemap.xml generation to lose the error message. Still hoping for a fix

Share this post


Link to post
Share on other sites
2 hours ago, psy said:

Problem didn't go away for me. It still exists and no solution found. Turned off sitemap.xml generation to lose the error message. Still hoping for a fix

Do you have a SEO field (FieldtypeSeoMaestro) added to at least one of your templates? I can't remember if this was always a requirement, but without that the module won't generate a sitemap, and thus it will output that specific error message.

This error is a bit misleading: it recommends checking that the folder on disk is writable, but you'll get the same error even if you simply didn't have any items to add to the sitemap. What's happening here is basically that the module attempts to generate a sitemap with SitemapManager::generate(), which returns false if it fails to write the file, but also if there are no items to be found. Ping @Wanze – might be a good idea to add additional check for this 🙂

If you do have the SEO field and the write permissions are fine, I'd probably try debugging the sitemap generation code in the SitemapManager class, just to see if it's working as expected.

  • Like 2

Share this post


Link to post
Share on other sites

Hi @teppo, yes had field named 'seo' of FieldtypeSeoMaestro assigned to a number of templates and publicly viewable pages

Share this post


Link to post
Share on other sites
11 minutes ago, psy said:

Hi @teppo, yes had field named 'seo' of FieldtypeSeoMaestro assigned to a number of templates and publicly viewable pages

Well, this likely rules out the first issue I was thinking of.

There are still two possible explanations: either sitemap generation fails, or writing the sitemap file to the disk fails. I'm not particularly familiar with this module, so all I can suggest at this point would be dumping some debug data out of SitemapManager::generate() function; basically checking if the !count() statement is returning false (in which case there are no items, which in turn would warrant further investigation into why that would happen), or if it's the write operation that is failing.

You should also double-check that the path on disk (the root of your site, essentially) is writable for the user running Apache (often www-data, but could be something else, depending on your setup).

Edit: I installed SeoMaestro on a new site running the latest dev version, and everything worked as expected. I know this won't help much in this case, but at least I can confirm that the module should work, which means that the issue is likely somehow related to your environment, or the specifics of your site 😕

Edited by teppo
  • Like 2

Share this post


Link to post
Share on other sites

Thanks again @teppo. I tried a few things with my limited knowledge of Apache including changing root dir privileges to 777 (scary I know!) for testing purposes to see if the error message was correct. Didn't change anything so switched the root dir privileges back to PW preferred settings.

Obviously something is amiss and fairly certain it's not that SeoMaestro cannot create the file. I even saved a dummy sitemap.xml file (updated module prefs to same file name) in the root dir and still no luck. I've used this module before with success on other sites with earlier PW versions.

Problem reared its head with PW1.0.142+. Wondering if maybe latest .htaccess or other is affecting things? @Wanze?

Share this post


Link to post
Share on other sites

Hi @psy

The module does a pre-check if the folder of the sitemap is writeable (https://github.com/wanze/SeoMaestro/blob/master/SeoMaestro.module.php#L174-L181). If not, it should not attempt to create the sitemap at all. So I think that we can rule this error out. Thanks @teppo for the investigation and the hint regarding the misleading error message. I fixed it with the following commit: https://github.com/wanze/SeoMaestro/commit/3fc2835b4ea1956006a82b9f8363cb6f89b4f1f4. The module now throws an exception if the sitemap folder is not writeable. This allows to distinguish this error from other errors that could happen during the sitemap generation process. @psy If you update to the latest version on master, you should not see the misleading error message anymore.

Did you check the ProcessWire logs if they contain any errors? Also possibly check the PHP error logs on your webserver. My guess is that somehow an error happens during the sitemap generation process. Because this process is executed after the response has been sent back to the client, error messages are not that obvious. If you do not find any error messages, I'd suggest to downgrade ProcessWire to the latest version where things worked as expected. Do you have any SeoMaestro related hooks in place that could cause errors?
.htaccess changes should not have any effects on this module. If you can, try to debug what happens during the request, for example with xdebug (like Teppo suggested earlier).

Cheers

  • Like 2

Share this post


Link to post
Share on other sites
On 10/31/2019 at 10:21 AM, neophron said:

Hi,

I noticed the following problem:
Processwire 3.0.123 and seomaestro 0.9.0, the step after the installation, where you can enable the sitemap generation. After hitting »submit« I got this error:

Session: Failed to generate the XML sitemap. Make sure that "/www/htdocs/.../pw-3-0-123" is writeable.

This happens in two different PW installations.
After replacing the module with the 0.6.0 version, everything works fine.

Hi @neophron

Can you download the latest version of the master branch from GitHub and check if you still get this error? The error message was misleading. Before downgrading, did you check if the sitemap has been generated as expected?

Share this post


Link to post
Share on other sites
 

I replaced your latest version from github. Now the sitemap generation works fine, but as soon as I'm editing a page, this error shows up in the backend/admin area:

WireDatabasePDO: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_seomaestro.structuredData_inherit' in 'field list'

This error appears only in pages with templates, where the seomeastro field is included.
Do you need more informations from my installation?

Share this post


Link to post
Share on other sites
34 minutes ago, neophron said:
 

I replaced your latest version from github. Now the sitemap generation works fine, but as soon as I'm editing a page, this error shows up in the backend/admin area:

WireDatabasePDO: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_seomaestro.structuredData_inherit' in 'field list'

This error appears only in pages with templates, where the seomeastro field is included.
Do you need more informations from my installation?

It seems like ProcessWire did not update the included FieldtypeSeoMaestro module to 0.9.0. Can you hit the "Refresh" button in the ProcessWire admin? This error should go away if the FieldtypeSeoMaestro module is updated to version 0.9.0 as well.

Share this post


Link to post
Share on other sites

I refreshed the modules after I replaced the module. The error is still there. Check my screenshots.

Bildschirmfoto 2019-11-03 um 14.34.25.jpg

Bildschirmfoto 2019-11-03 um 14.34.36.jpg

Share this post


Link to post
Share on other sites

@neophron That's weird. I know why the error happens: The module introduced a new group "structured_data", which also needs a new column for each SeoMaestro field in the database. The following code should take care of this when the module is being updated: https://github.com/wanze/SeoMaestro/blob/master/SeoMaestro.module.php#L64-L68
For some reason in your case, this did not happen. Can you try to execute the code above anywhere in a template? Or temporarily copy it into the module's ready() method. This should update each database table and resolve the error you're seeing.

Cheers

Share this post


Link to post
Share on other sites
1 hour ago, Wanze said:

@neophron That's weird. I know why the error happens: The module introduced a new group "structured_data", which also needs a new column for each SeoMaestro field in the database. The following code should take care of this when the module is being updated: https://github.com/wanze/SeoMaestro/blob/master/SeoMaestro.module.php#L64-L68
For some reason in your case, this did not happen. Can you try to execute the code above anywhere in a template? Or temporarily copy it into the module's ready() method. This should update each database table and resolve the error you're seeing.

Cheers

Now I took a different PW installation on a different server, I installed SeoMaestro the classic way, trough modules --> install.
I tested till now only the sitemap.xml generation and it works fine.

Share this post


Link to post
Share on other sites
On 4/20/2019 at 3:48 PM, Peter Knight said:

@Peter Knight UPDATED: After a little more research, I have discovered that index, follow are the default for search engines and don't need to be specified so it appears as if your module is functioning as it should.

 

Hi Peter,
I just found your post: If I activate the options »Prevent search engines from indexing this page« and »Prevent search engines from following links on this page« see maestro will generate <meta name="robots" content="noindex, nofollow">.
The no existing of this meta-tag is equal to <meta name="robots" content="index, follow">. Is this correct?

 

Bildschirmfoto 2019-11-08 um 17.44.15.jpg

Share this post


Link to post
Share on other sites
36 minutes ago, neophron said:

The no existing of this meta-tag is equal to <meta name="robots" content="index, follow">. Is this correct?

yep

  • Thanks 1

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.

×
×
  • Create New...