Jump to content

Wanze

PW-Moderators
  • Posts

    1,116
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by Wanze

  1. Hi folks,

    I just released version 1.1.1 which fixes the PHP 8.1 related errors from this issue: https://github.com/wanze/SeoMaestro/issues/41

    These issues have been fixed by merging a pull request. I appreciate if the community can help me out, as I am quite disconnected from the ProcessWire world (as you might have noticed). However, I still want to support this module with bugfix releases.

    Cheers

    • Like 6
  2. Hi @Flashmaster82

    Quote

    I need to generate multiple pdf´s on the same page but with different content and styling.

    In this case you need to use the module "WirePDF" bundled in the Pages2Pdf module. You can use WirePDF to generate PDFs with custom content and styling. The readme has some examples how to do this: https://github.com/wanze/Pages2Pdf#wirepdf

    I suggest to also take a look at other existing ProcessWire PDF modules, as this one is really old and not maintained actively - it still works though ?

    Cheers

    • Like 3
  3. 20 hours ago, markus_blue_tomato said:

    Sure, didn't find yet where the output happens of the meta data.

    How do you add the meta property to the Page?  I only know this way: https://processwire.com/api/ref/wire/add-hook-property/ but did not found it in the code

    The module uses an object "PageFieldValue" which holds the hydrated data from the database and gets initialized by the fieldtype: https://github.com/wanze/SeoMaestro/blob/master/src/PageFieldValue.php

    Each meta data group has its own class to render specific data, e.g. this one for the "meta" group: https://github.com/wanze/SeoMaestro/blob/master/src/MetaSeoData.php

    Hope that helps a bit ?

    • Thanks 1
  4. 20 hours ago, Andoro said:

     

    With current settings and hardware the sitemap generation stops at 30secs, despite the max execution time was set to 120secs

    Hi @Andoro

    From your description it sounds like you have a memory problem. Do you see anything in the logs? Try bumping your "memory_limit" setting in your php.ini file, does it help?

    Cheers

  5. On 10/8/2020 at 10:06 PM, markus_blue_tomato said:

    Hi @Wanze,

    I saw, that the SeoMaestro Fields have no fallback to default language, like other processwire fields, if the current language value is not set.

    Is this possible?

    I would have to look how ProcessWire handles this case, not sure if it's easily doable. Currently, I don't have time available, if you'd like to take a look - I'm happy to merge a pull request ?

    Cheers

  6. On 6/12/2020 at 9:26 PM, iNoize said:

    OK thanks, it means I have to set manually for each document where the images fiels is called immo_images. 

    This Module don't check also for the TV value. Example if images is empty use the next one placeholder from main config

    You can setup the default values for each template and pages using that template will inherit the configured placeholder by default, unless overridden on page-level. 

    For your second question: No, there is no such fallback implemented. You would need to programmatically add that logic yourself by using hooks.

  7. On 6/4/2020 at 5:49 AM, iNoize said:

    Hello, 

    some of my sites have the Image TV called {images} and some {immo_images} if i try to define the basic value like 

    {images} {immo_images} it doesnt work. for images. 

    For descriprion is no problem but how i can solve this for images in open graph ? 

    Thanks. 

    Hi @iNoize

    It should work, here's a quote from the readme:

    Quote

    The opengraph image tag supports placeholders as well: Simply reference an image field. If the field is holding multiple images, the first one is used. For example, {images} would pick the first image from the images field.

    However, you can only use one field as placeholder for the Opengraph image, so either {images} or {immo_images}. Hope that helps!

    Cheers

  8. On 5/8/2020 at 1:44 PM, csaggo.com said:

    Hello @Wanze
    thanks for the great Plugin. I am Using a template with segments. Im able to overwrite the canonical url just like i needed. But in og:url i cannot overwrite when i try it like this:

    page()->seo->og->url = $canonical;

    am i doing something wrong? the url field seemingly is not part of the changeable fields but just generated. i think in this case canonical should be used when it is overwritten (like in this case i overwrite canonical before og:url

    thank you for your feedback ?

    Hi @csaggo.com

    It seems like there is no url field for opengraph tags. At the moment, the og url is generated dynamically based on the page's httpUrl, so you cannot change it at runtime. If the module would use the canonical url at render time, it should work. Can you open an issue on GitHub? ?

    Cheers

    • Like 1
  9. On 4/15/2020 at 2:31 PM, 3fingers said:

    [Litte OT]

    @Wanze Out of curiosity, has something changed in your development arsenal? ?

    Hi @3fingers

    Yes and no ? I used ProcessWire for some projects as freelancer, but never at my "daily" work. I still believe that ProcessWire is a great open source software and I'm maintaining a couple of private projects. But in my opinion, ProcessWire lacks of some important features (testing, config management, migration handling, command line tools, extensible frontend etc.) and also it is not easy to setup if multiple people are working on the same project. Nowadays I am writing Flutter apps and Javascript. But of course I still come back here to give some support and to see how ProcessWire evolves! ?

    Cheers

    • Like 1
  10. 5 hours ago, HerTha said:

    Okay, I understand there is no simple toggle/option to exclude/include hidden files, so I will have a closer look at hooks then.

    Thank you so much for the time you are dedicating to maintain this module and to answering (my) questions!

    You're welcome! ?Let me know if you need any help in implementing a solution using hooks. Maybe the following examples from the tests could be useful : https://github.com/wanze/SeoMaestro/blob/master/tests/src/SitemapManagerTest.php#L177-L220

    Cheers

    • Like 1
    • Thanks 1
  11. 15 hours ago, HerTha said:

    I'd like to exclude all hidden pages - except for a few specific ones (manually selected).

    Is there a way how this could be established?

    You have the following possibilities:

    • Manually include/exclude all pages via SeoMaestro field
    • Setup the default value on template level to not include pages in the sitemap, and then manually include them via SeoMaestro field. Or vice versa, whatever makes more sense ?
    • If you know how to use hooks: Exclude the hidden pages by using the hook mentioned in my first answer

    Cheers

    • Like 1
  12. 18 hours ago, B3ta said:

    Hi @Wanze,

    I would also like to know if there is any way to improve the way the sitemap gets generated and the way the frontend its affected in the process.


    My website have a few thousands of pages and growing rapidly. with a really powerful server, and constant changes , the sitemap refreshes every hour. 

    1. Do you think you can build the sitemap.xml in a less resource intensive way? 

    2. For bigger websites with more than 50k pages probably websites will need a sitemapindex and a way to keep the sitemap in this limits. 
     

    According to a quick google search the Sitemaps should be no larger than 50MB (52,428,800 bytes) and can contain a maximum of 50,000 URLs.
     

    Thanks! 

    Hi @B3ta,

    The sitemap generation should not affect your frontend; the sitemap should only be generated on requests where a user is logged into the admin: https://github.com/wanze/SeoMaestro/blob/master/SeoMaestro.module.php#L154

    1. If the performance is a problem on sites with a large amount of pages, I suggest to disable the automatic generation and to create the sitemap manually via cronjobs. You'd need a CLI script that bootstraps ProcessWire and then executes $wire->module('SeoMaestro')->getSitemapManager()->generate().

    2. I would be happy to support multiple sitemaps, but I do not have any time/capacity at the moment, nor am I working with ProcessWire anymore. If anyone would like to contribute this, please send a pull request!

    Cheers

  13. On 4/5/2020 at 2:09 PM, HerTha said:

    Hi @Wanze thanks for this fantastic module!

    Is there a way to control how the module's XML sitemap generator handles hidden pages?

    Hi @HerTha,

    What kind of control do you need exactly? Hidden pages are not excluded from the sitemap by default. Currently, you can either include/exclude hidden pages via SeoMaestro field. Or you can use the following hook to alter sitemap items programatically: https://github.com/wanze/SeoMaestro#___sitemapitems

    Cheers

    • Like 1
  14. On 4/9/2020 at 10:18 AM, palacios000 said:

    Thanks for this module.

    Is there a way to sanitize the description field in order to remove HTML tags? The field I set up to display the default og: description is a textarea with HTML formatting... This is how is rendered on the page:

    
    <meta property="og:description" content="&lt;p&gt;La linea di Pomate Freita&amp;nbsp;Bio&amp;...

    Thanks for your help!

    Hi @palacios000

    There is no setting to strip HTML tags, you'd need to use the following hook to transform the value prior to being rendered by the module: https://github.com/wanze/SeoMaestro#___renderseodatavalue

    Cheers

    • Like 2
  15. 15 hours ago, Sevarf2 said:

    I already checked, it's ok, with https. btw, the base url in the module config is used for the sitemap not for the meta tags.

    The module uses $page->httpUrl to generate the URL. The protocol of this method is resolved by settings on template and config level ($template->https / $config->noHTTPS). Can you check both of them?

    The base url is used for the sitemap but also for the canonical url metatag. ?

    Cheers

  16. On 11/21/2019 at 5:18 PM, adrian said:

    Thanks @sz-ligatur - that hook is very helpful.

    @Wanze - the catch with the hook approach is that the FB preview doesn't show the correct image - is there an easy way to fix that? Thanks!

    The solution mentioned above does not use any hooks. ? I did not test it, but I'm positive that the image pulled from the home page appears in the preview.

    • Like 1
  17. Hi @adrian

    You could use the solution mentioned by @sz-ligatur

    1. 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.
    2. 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 I'd rather keep it simple for now ?

    Cheers

    • Like 1
  18. @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

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

  20. 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?

  21. 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
×
×
  • Create New...