clarkwinkelmann

I send to you. Please check and help me.

[2024-04-05 05:47:42] flarum.ERROR: ParseError: syntax error, unexpected 'Cloud' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /usr/share/nginx/html/vendor/v17development/flarum-seo/src/Listeners/PageListener.php:58
Stack trace:

Is there anyway to make topic page title as : Topic Heading - Tag/Category - Site Name

right now it is : Topic Heading - Site Name

Is this flarum thing or this something this plugin can do ?

    wbntff it can be done by writing an extension. I don't think one exists for that at the moment unfortunately.

    sangnv91 I would say you need to go away and spend a little time fixing up your setup, running from /usr/share is a little (very odd) and if I recall its the default location for nginx to store its defaults.

    I would suggest starting again, setting up nginx properly using /srv/website/ or /var/www/ alongside php-fpm - take time to configure a proper nginx site config (not /etc/nginx/nginx.conf..) the site one usually symlinked into /sites-enabled (but lives in sites-available)

    Take the time on that then setup composer (and the linux users) properly so you do not need sudo or root to accomplish your goals.. if in doubt .. use shared hosting

    a month later

    Appears to be an error for deprecated PHP

    [24-May-2024 17:34:35 UTC] PHP Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /home/REDACTED/REDACTED/vendor/v17development/flarum-seo/src/Managers/Tag.php on line 48

    Posted Error here : v17development/flarum-seo88

    2 months later
    a month later
    a month later

    Flarum SEO 2.0 - Reworked & new features

    It's finally time for Flarum SEO 2.0! With lots of changes and a fresh and reworked codebase, it's ready for the bright future of Flarum.

    SEO Meta editor

    Exciting news! New in this version is the SeoMeta editor. With this editor, you are able to manually update meta tags on a page. You can give discussion keywords, update their social-media image and create separate cards for Twitter / X & other social media! No database, it's all managble through the frontend.

    Seo Meta will be stored in a separate table in your database and it will automatically update as soon as your content changes. When a crawler loads your page, it will use the stored data or generate one on the fly for the next time.

    While managed tags are great, the best part is that you can disable auto-meta updates and configure the page yourself! Robot settings & keywords are always editable to customize it to your liking 🔥

    Extending yourself

    It's now easier than ever to extend the Flarum SEO extension. Exciting right? You can create custom SEO-Meta objects and trigger the meta-editor. A good example how that could work can be seen here:

    Or review the SEO update for the blog extension.

    Important to know is: SeoMeta is attached to an object and is named to the plural version, like: discussions, tags and blogs.

    Code examples

    Example to find or create a SeoMeta object for an

    // https://github.com/v17development/flarum-seo/blob/master/src/Page/DiscussionPage.php
    // Get seo-meta-date
    $seoMeta = SeoMeta::findByModelOrCreate(
      $discussion
    );
    
    // Run events in case the model was created
    $this->dispatchEventsFor($seoMeta);
    
    // Generate SEO tags
    $properties->generateTagsFromMetaData($seoMeta);

    Trigger the meta-dialog in the frontend:

    // https://github.com/v17development/flarum-blog/blob/master/js/src/forum/components/BlogPostController.js
    const {
      components: { MetaSeoModal },
    } = require('@v17development-seo');
    
    app.modal.show(MetaSeoModal, {
       objectType: 'discussions',
       objectId: discussion.id(),
    })

    Changelog

    Update

    To update, run:

    composer update v17development/flarum-seo

    ℹ️ Important: You need to run migrations!

    ⚠️ Keep in mind: this update includes many code changes. If you run into an error, please open an issue here.

      JasperVriends Hello
      After installing this plugin, I get an error when I try to edit the SEO settings of the discussion. Log file:

      [2024-10-15 22:32:52] flarum.ERROR: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'httpdneh1_flarum.seo_meta' doesn't exist in /home/httpdneh1/domain.tld/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:82
      Stack trace:

      Also, when I issue the composer migrate command, I encounter this error in the terminal.


      Interestingly, I'm not encountering this error right now, but I have to say that the Configure SEO field looks very bad on mobile. It should definitely have a better mobile look.

        Umutcan please share your MySQL/MariaDB version, it's probably relevant to this issue. And your whole php flarum info while at it.

        I haven't used the extension myself but this will probably help Jasper

        Denys Have you tried to explicitly use v2 in the tags, like composer require v17development/flarum-seo ^2 ?

          Hi, Sirs,

          The following issue only appears when using the admin login:

          v17development-flarum-seo failed to initialize, check the browser console for further information.

          Logs:

          [2024-10-15 16:19:19] flarum.ERROR: ReflectionException: Class "V17Development\FlarumBlog\SeoPage\SeoBlogOverviewMeta" does not exist in /www/wwwroot/flarum/vendor/illuminate/container/Container.php:877
          Stack trace:
          #0 /www/wwwroot/flarum/vendor/illuminate/container/Container.php(877): ReflectionClass->__construct()
          #1 /www/wwwroot/flarum/vendor/illuminate/container/Container.php(758): Illuminate\Container\Container->build()
          #2 /www/wwwroot/flarum/vendor/illuminate/container/Container.php(694): Illuminate\Container\Container->resolve()
          #3 /www/wwwroot/flarum/vendor/v17development/flarum-seo/src/Extend/SEO.php(51): Illuminate\Container\Container->make()
          #4 /www/wwwroot/flarum/vendor/illuminate/container/Container.php(1265): V17Development\FlarumSeo\Extend\SEO->V17Development\FlarumSeo\Extend\{closure}()
          #5 /www/wwwroot/flarum/vendor/illuminate/container/Container.php(1211): Illuminate\Container\Container->fireCallbackArray()
          #6 /www/wwwroot/flarum/vendor/illuminate/container/Container.php(778): Illuminate\Container\Container->fireResolvingCallbacks()
          #7 /www/wwwroot/flarum/vendor/illuminate/container/Container.php(694): Illuminate\Container\Container->resolve()
          #8 /www/wwwroot/flarum/vendor/illuminate/container/Container.php(1027): Illuminate\Container\Container->make()
          #9 /www/wwwroot/flarum/vendor/illuminate/container/Container.php(947): Illuminate\Container\Container->resolveClass()

          Could you please advise me on how to troubleshoot this issue? Or is there any additional information I need to provide?

          
          `Flarum core: 1.8.7
          PHP version: 8.3.12
          MySQL version: 8.0.37
          Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, readline, Reflection, SPL, session, standard, sockets, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, intl, exif, mysqlnd, PDO, Phar, posix, shmop, SimpleXML, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlwriter, xsl, mysqli, pdo_mysql, pdo_sqlite, xmlreader, igbinary, msgpack, redis, swoole
          +-------------------------------------------+---------+--------+
          | Flarum Extensions                         |         |        |
          +-------------------------------------------+---------+--------+
          | ID                                        | Version | Commit |
          +-------------------------------------------+---------+--------+
          | flarum-markdown                           | v1.8.1  |        |
          | flarum-flags                              | v1.8.1  |        |
          | flarum-suspend                            | v1.8.2  |        |
          | v17development-seo                        | v2.0.2  |        |
          | askvortsov-rich-text                      | v2.1.7  |        |
          | flarum-sticky                             | v1.8.1  |        |
          | flarum-tags                               | v1.8.2  |        |
          | flarum-lock                               | v1.8.1  |        |
          | fof-formatting                            | 1.0.3   |        |
          | afrux-forum-widgets-core                  | v0.1.7  |        |
          | fof-oauth                                 | 1.6.12  |        |
          | flarum-nicknames                          | v1.8.1  |        |
          | fof-pages                                 | 1.0.8   |        |
          | flarum-approval                           | v1.8.2  |        |
          | fof-user-directory                        | 1.3.3   |        |
          | clarkwinkelmann-advanced-search-highlight | 1.0.2   |        |
          | v17development-blog                       | v0.8.0  |        |
          | sycho-advanced-extension-categories       | v0.1.3  |        |
          | wanecho-mediaembed                        | 1.0.1   |        |
          | the-turk-stickiest                        | 3.0.1   |        |
          | the-turk-flamoji                          | 1.0.4   |        |
          | sycho-profile-cover                       | v1.3.5  |        |
          | sycho-lite-youtube                        | v0.1.1  |        |
          | rob006-last-post-avatar                   | 1.2.4   |        |
          | pipecraft-id-slug                         | v1.1.0  |        |
          | nearata-tags-color-generator              | v2.3.0  |        |
          | muhammedsaidckr-gemini                    | v1.0.4  |        |
          | malago-fancybox                           | 0.3.0   |        |
          | justoverclock-og-meta-tag                 | 0.1.0   |        |
          | justoverclock-hashtag                     | 1.0.1   |        |
          | justoverclock-dontgoaway                  | 0.2.5   |        |
          | justoverclock-custom-html-widget          | 0.1.4   |        |
          | justoverclock-country-flags               | 1.0.0   |        |
          | justoverclock-contactme                   | 0.2.3   |        |
          | ianm-oauth-line                           | 0.1.4   |        |
          | ianm-html-head                            | 1.2.3   |        |
          | ianm-boring-avatars                       | 1.0.0   |        |
          | hamcq-pangujs                             | 1.0.3   |        |
          | glowingblue-redis-setup                   | 1.2.2   |        |
          | gbcl-userip                               | 1.1.0   |        |
          | fof-username-request                      | 1.2.4   |        |
          | fof-user-bio                              | 1.4.0   |        |
          | fof-upload                                | 1.5.5   |        |
          | fof-socialprofile                         | 1.1.6   |        |
          | fof-sitemap                               | 2.2.1   |        |
          | fof-share-social                          | 1.2.0   |        |
          | fof-profile-image-crop                    | 1.1.6   |        |
          | fof-pretty-mail                           | 1.1.2   |        |
          | fof-nightmode                             | 1.5.3   |        |
          | fof-merge-discussions                     | 1.4.1   |        |
          | fof-links                                 | 1.3.0   |        |
          | fof-filter                                | 1.2.0   |        |
          | fof-default-user-preferences              | 1.2.1   |        |
          | fof-best-answer                           | 1.5.5   |        |
          | fof-anti-spam                             | 1.1.2   |        |
          | fof-analytics                             | 1.1.0   |        |
          | flarumtr-mobile-search                    | v1.2    |        |
          | flarum-subscriptions                      | v1.8.1  |        |
          | flarum-statistics                         | v1.8.1  |        |
          | flarum-pusher                             | v1.8.1  |        |
          | flarum-mentions                           | v1.8.4  |        |
          | flarum-likes                              | v1.8.1  |        |
          | flarum-lang-english                       | v1.8.0  |        |
          | flarum-lang-chinese-traditional           | v1.23.0 |        |
          | flarum-lang-chinese-simplified            | v1.4.2  |        |
          | flarum-extension-manager                  | v1.0.4  |        |
          | flarum-bbcode                             | v1.8.0  |        |
          | davwheat-ads                              | 1.2.0   |        |
          | datlechin-silent-edit                     | v0.1.0  |        |
          | datlechin-scroll-buttons                  | v1.1.0  |        |
          | datlechin-posted-on                       | v0.2.1  |        |
          | datlechin-link-preview                    | v1.5.0  |        |
          | clarkwinkelmann-scout                     | 0.3.5   |        |
          | clarkwinkelmann-first-post-approval       | 1.0.1   |        |
          | clarkwinkelmann-author-change             | 1.0.3   |        |
          | cccyun-clogin-oauth                       | v1.0.2  |        |
          | blomstra-turnstile                        | 0.1.6   |        |
          | blomstra-spam-prevention                  | 1.7.0   |        |
          | blomstra-fontawesome                      | 0.1.5   |        |
          | askvortsov-markdown-tables                | v1.2.1  |        |
          | askvortsov-article-series                 | v0.2.0  |        |
          | afrux-online-users-widget                 | v0.1.6  |        |
          | afrux-forum-stats-widget                  | v0.1.1  |        |
          | afrux-asirem                              | v0.1.8  |        |
          | acpl-mobile-tab                           | 1.4.4   |        |
          +-------------------------------------------+---------+--------+
          Base URL: https://flarum.subarist.net
          Installation path: /www/wwwroot/flarum
          Queue driver: redis
          Session driver: redis (Code override. Configured to file)
          Scheduler status: Active
          Mail driver: smtp
          Debug mode: ON
          
          Don't forget to turn off debug mode! It should never be turned on in a production system.`

            Subarist I encountered the same issue when in installed the blog extension, seems to be something between those two extensions not working as expected without the blog extension all was functional once again.

            Subarist Do you only get this error in the admin panel? Can you verify that the file SeoPage/SeoBlogOverviewMeta.php exists in the v17development/flarum-blog vendor folder?

            Denys Can you try composer why-not v17development/flarum-seo 2.0 and see if it returns any reason why it cannot install?

              JasperVriends
              Hi,Sir
              The file does exist, but I found it in the "temp-vendor" directory:
              /www/wwwroot/flarum/temp-vendor/v17development/flarum-blog/src/SeoPage/SeoBlogOverviewMeta.php

              There are no errors in the admin panel; it occurs when logging into the homepage for the first time with the admin account.

                Subarist Interesting! So inside the vendor forum, you don't see that file? If so, can you try to uninstall the extension and then re-install? Or is the temp-vendor your backup?