IanM Simplify console commands into one new command fof:sitemap:build
Add cleanup from other modes so that old sitemap files are not left behind
Flarum 1.0

Could someone change that in the initial description?

I was wondering why my sitemap did get lost and google kept sending me mails. Thanks.

    11 days later

    Hari did this command got changed to php flarum fof:sitemap:build ?

    m4v3rick

    See my post 😉

    Guess so - documentation is not up to date.

      5 days later

      I found an error in flarum log;

      [2022-02-19 00:50:53] flarum.ERROR: Symfony\Component\Console\Exception\CommandNotFoundException: Command "fof:sitemap:cache" is not defined.

      Did you mean this?
      fof:sitemap:build in /var/www/html/vendor/symfony/console/Application.php:709
      Stack trace:
      #0 /var/www/html/vendor/symfony/console/Application.php(259): Symfony\Component\Console\Application->find()
      #1 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
      #2 /var/www/html/vendor/flarum/core/src/Console/Server.php(42): Symfony\Component\Console\Application->run()
      #3 /var/www/html/flarum(24): Flarum\Console\Server->listen()
      #4 {main}

      anything wrong in my config?

      • Hari replied to this.

        Hari I tried this from command line, sitemap.xml is created and being updated. I just wonder what these errors are?

        Hari oh no, sitemap.xml does not update itself. I've to do it manually via runnig php flarum fof:sitemap:build command from cli.

        I think related php files are not updated and still running old command fof:sitemap:cache

        I am rewriting this extension from scratch (pretty much). So I don't think we'll patch this soon, unless someone else wants to do a patch release.

        You can probably temporarily set up the correct command as a cronjob.

          18 days later

          meihuak it is more work than anticipated, it's on my to do still. It will just be a new major release of fof/sitemap, not a new extension.

            2 months later

            jaikrishna-tavva9

            In your local extend.php add:

            (new \FoF\Sitemap\Extend\RemoveResource(\FoF\Sitemap\Resources\User::class)),

              IanM for completions sake that line has to go within the [], see:

              
              return [
                  (new \FoF\Sitemap\Extend\RemoveResource(FoF\Sitemap\Resources\User::class)),
              ];

              Didn't the permission also remove the users?

                girefko submitting URLs in sitemap and blocking them using robots using disallow tag is really a bad practice and we will see these URLs as errors in the search console. v17development/flarum-seo63

                make sure this is set to off