Jump to content

Wanze

PW-Moderators
  • Content Count

    1,097
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Wanze

  1. Wanze

    SeoMaestro

    Hi all, I just released the first stable version (1.0.0). Decided to go stable because there have not been many bug reports. The module follows the SemVer specification: There won't be any breaking changes in the API for the 1 major version. Here's the changelog of the release: https://github.com/wanze/SeoMaestro/releases/tag/v1.0.0 Happy day πŸ™‚
  2. Wanze

    SeoMaestro

    Hi @adrian You could use the solution mentioned by @sz-ligatur Setup an image field holding the OG image (og_image). Configure this field to use the image of the homepage as default value, if no image is set. Use the placeholder {og_image} in SeoMaestro. The meta tag should now output the image of the homepage unless content editors overwrite the OG image in a page. Would this solution work for you? I think we'd introduce another level of complexity if the inheritance model includes the page tree and rather keep it simple for now πŸ™‚ Cheers
  3. Wanze

    SeoMaestro

    @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
  4. Wanze

    SeoMaestro

    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.
  5. Wanze

    SeoMaestro

    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?
  6. Wanze

    SeoMaestro

    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
  7. Wanze

    SeoMaestro

    I agree. Could you open an issue on GitHub? Should be easy to integrate this in the next release. @tires Not in the current version. Technically there is a way, but it feels hacky. You'd need hook after SeoMaestro::___renderSeoDataValue() and then entity decode and encode the value again. See: https://github.com/wanze/SeoMaestro#___renderseodatavalue Cheers
  8. Hi Markus, Why do you want to parse it yourself? πŸ™‚ Twig and Smarty have built-in parsers and both offer to extend the parser with your own functions / filters / modifiers and so on. Twig even allows you to write custom expressions. Here is an example how to integrate the "__('text') function into Twig, assuming you are using the TemplateEngineFactory in combination with the TemplateEngineTwig module. $this->addHookAfter('TemplateEngineTwig::initTwig', function (HookEvent $event) { /** @var \Twig_Environment $twig */ $twig = $event->arguments('twig'); $function = new \Twig_SimpleFunction('__', function ($key) { return __($key, "/site/templates/translations/strings.php"); }); $twig->addFunction($function); }); As you can see, I'm collecting all my translatable strings in a PHP file "strings.php". But you could also extend the twig function to optionally accept the text domain. Cheers
  9. Wanze

    SeoMaestro

    @tires Thanks! The meta tags need to be HTML encoded because they are rendered inside HTML tags. This is not an issue, the tags will appear correctly in Google. The "ä" you are seeing in the source code is not related to the character encoding, it is just a character being HTML encoded. Cheers
  10. Wanze

    SeoMaestro

    @Tyssen I just realized that you are having a different issue. For some reason, the module fails to deserialize a correct SeoMaestro page value object. Does this happen for every page? If you have xdebug installed, you would set a breakpoint here and check what happens during the request: https://github.com/wanze/SeoMaestro/blob/master/FieldtypeSeoMaestro.module.php#L54 Although I cannot see how the code would return anything other than a PageFieldValue object, which means that somewhere this object gets casted to a "stdClass". Are you using any hooks which could produce this problem? Also: Can you check the contents of your database row for the SeoMaestro field and the page where this error occurs? Cheers
  11. Wanze

    SeoMaestro

    The commit which fixes the mentioned issue is not included in PW 3.0.141. You need to get the latest version from the "dev" branch or make sure that you include the code of this commit.
  12. Wanze

    SeoMaestro

    Uups, sorry about that. I did not think about this issue and also missed to handle the "error" case. 🀭So in your case, the module was generating the sitemap on every request. At least it did not affect the frontend πŸ˜…Kudos to @teppo for bringing this up! πŸ™‚ Cheers
  13. Wanze

    SeoMaestro

    You are most likely facing this core bug, which should be fixed by now: https://github.com/processwire/processwire-issues/issues/979 Check some of the replies on the previous page, others have mentioned the same error - should be gone if you update ProcessWire. Cheers
  14. Wanze

    SeoMaestro

    Hi guys, I just released version 0.9.0 of the module which includes some fixes and new additions, you can find all the details in the changelog. What's new? The module offers a new section "Webmaster Tools" when editing a field, allowing you to set verification codes for Google and Bing. If set, these codes are rendered as additional meta tags. I had to refactor the UI in order to separate the webmaster tools from editing the default values. My solution was to separate them via fieldsets: Cheers
  15. Wanze

    SeoMaestro

    Hi @antpre Your PHP version is most likely below 7.0, try to update. Some more information about this error can be found here: Cheers
  16. Wanze

    SeoMaestro

    Glad it works, thanks for the feedback! This fix will be integrated in the next release, so you'll be able to update safely. Cheers
  17. Wanze

    SeoMaestro

    Hi @sz-ligatur Looks like you've found a bug! The relevant code is here: https://github.com/wanze/SeoMaestro/blob/master/src/MetaSeoData.php#L30-L35 It looks like these lines do not grab the field's value in the current language. Can you try to change the code like this: // Old if ($field->get('meta_title_format')) { $value = str_replace('{meta_title}', $value, $field->get('meta_title_format')); } // New $metaTitleFormat = $field->get('meta_title_format' . $this->getCurrentLanguageId()) ?: $field->get('meta_title_format'); if ($metaTitleFormat) { $value = str_replace('{meta_title}', $value, $metaTitleFormat); } Not tested and written in the browser, but maybe it works πŸ™‚ Cheers
  18. Hi @regesh Wrote you back on GitHub, hope it helps: https://github.com/wanze/TemplateEngineTwig/issues/22 Cheers
  19. Wanze

    SeoMaestro

    Thanks @elabx The module allows to fallback to fields using placeholders. For example, if your page has a field lead_text, you can set the default value of the meta description to {lead_text}. If the content editor omits the meta description of a page, it will fallback to the lead text. It is not possible to fallback to multiple fields though. Does this answer your question? Cheers
  20. Wanze

    SeoMaestro

    Hi @teppo Thanks for your valuable feedback! What do you think about calling the label "Inherit default value"? For the explanation, we could use an InputfieldMarkup prior to any meta data fields (similar to the one when editing the default values on field-level). It has been mentioned before that it should be possible for content editors to edit default values without having permission to edit fields or templates. I think the module will (should) include another Process module, which could offer this configuration GUI, along with other interesting things such as SEO reports πŸ˜‰ The sitemap does not have to be in the site root necessarily, you could also enter a path to a writeable folder. But you're right, I actually never thought of this problem and also do not check it πŸ˜… At least this should be mentioned in a description or note. I am aware of the 404 hook, but I do not like it very much, it feels "wrong". Other hooks listening to the 404's might get triggered as well, but then it's no longer a 404 after returning the sitemap. Let me think about this πŸ˜„ Cheers
  21. Wanze

    SeoMaestro

    SeoMaestro (including myself) knows nothing about TemplateLatteReplace, so I cannot influence settings of this module. I am not sure why the LatteReplace would try to render the structured data template, I assume it's because SeoMaestro internally uses a ProcessWire TemplateFile to render the markup: https://github.com/wanze/SeoMaestro/blob/master/src/StructuredData/BreadcrumbStructuredData.php#L52-L55 There is nothing I can do from Seo Maestro's side about this, and I assume you will have problems with other modules as well that are using ProcessWire's TemplateFile for rendering. My TemplateEngineFactory module providing template engines like Twig, Smarty, Pug etc. does not suffer from this problem, because it hooks after Pager::render rather than TemplateFile::render. Cheers
  22. Wanze

    SeoMaestro

    The line in question is: $isTranslatable = $info['translatable'] ?? false; The "Null coalescing" operator was introduced with PHP 7 - are you sure you're using PHP 7.2? πŸ˜‰
  23. Wanze

    SeoMaestro

    Hi @Juergen This should work: $page->seo->robots->noIndex = 1; $page->seo->robots->noFollow = 1; Cheers
  24. Wanze

    SeoMaestro

    Done, thanks for the hint! πŸ˜… I was thinking that ProcessWire would update this information regularly? πŸ€”
  25. Wanze

    SeoMaestro

    Version 0.8.0 has been released: Adds facebook share preview for content editors when editing Opengraph meta data Adds support to extend the rendered meta title with additional information such as the domain or site name (#11) Renders structured data (JSON-LD) for breadcrumbs via new group "structuredData" (#10) Adds new meta group "structuredData" which will handle more types of structured data in the future πŸ€“ Happy weekend everyone! Cheers
Γ—
Γ—
  • Create New...