I get this on migrate


Migrating extension: v17development-seo

In Connection.php line 712:
                                                         
  SQLSTATE[42000]: Syntax error or access violation: 11  
  70 BLOB/TEXT column 'object_type' used in key specifi  
  cation without a key length (SQL: alter table `seo_me  
  ta` add unique `seo_meta_object_id_object_type_unique  
  `(`object_id`, `object_type`))                         
                                                         

In Exception.php line 18:
                                                         
  SQLSTATE[42000]: Syntax error or access violation: 11  
  70 BLOB/TEXT column 'object_type' used in key specifi  
  cation without a key length                            
                                                         

In PDOStatement.php line 117:
                                                         
  SQLSTATE[42000]: Syntax error or access violation: 11  
  70 BLOB/TEXT column 'object_type' used in key specifi  
  cation without a key length                            

MySQL version: 8.0.36-28

Fortunately my forum still works but the migration is broken and stops at this extension. This needs an urgent fix.

    CyberGene PC isn't working for me. Not sure if it's working for others.

    Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

      navindra thanks for the heads up. I removed the extension, does it work now? (To me it always worked, maybe I got served a cached version)

      So, apparently my forum is broken now. I’d appreciate it if you can fix this as quickly as possible. I see the same error has already been reported and as you can see there’s a pretty straightforward explanation in StackOverflow. Instead of waiting for a reply from the other guy who reported it, you could have fixed it already… Guys, please be more proactive in future, especially after major reworks of extensions.

        CyberGene Guys, please be more proactive in future, especially after major reworks of extensions.

        Seems a bit harsh. The extension is not only open source, it also happens to be free, with likely countless thankless hours put into it. The onus of testing should be on you before you deploy it live - they cannot and should not be expected to test every weird setup across the countless distributions.

          RelicSystem every weird setup

          My MySQL is the latest LTS version. That’s far from a weird setup. It’s the most orthodox setup there can be. And no, open source doesn’t mean that major rework testing should be on the users.

          BTW, the error seems to be valid for all MySQL versions. I would assume a migration was not tested with MySQL.

          Besides, even if we assume that the burden of testing this new development lies on us, users, well, that error was reported here, just a few posts above, by another user, two days ago. A simple search showed it’s a MySQL specific that is version independent.

            CyberGene And no, open source doesn’t mean that testing major rework should be on the users.

            Every hosting environment can be different. Different php versions, different database versions, different browsers, different internet connections, different locales, different combinations of extensions, different flarum core versions, different content created, etc.

            You cannot expect maintainers to be able to put in so many hours to test every edge case. And every maintainer who releases a new major build will have tested their changes locally, or they wouldn't tag that release.

            Understand that by demanding this level of engagement from a maintainer, is likely to cause frustration or stress on their end. A potential outcome could be for the maintainer to lose interest entirely. I don't expect you to want this, and neither do they.

            So please, be respectful and if you want to be supportive, here are a few things you can do to help:

            • help isolate the issue by categorizing reports, asking users for the php flarum info, testing against a clean install etc
            • reply in a positive way and be thankful for the fact that Jasper did come back to give you a massive overhaul of his extension
            • offer to buy Jasper a coffee (or tea) to boost their morale and act as an incentive to resolve the issue you encountered.

              luceos reading about the issue, it seems to be a limitation with MySQL hence with all versions (you cannot specify a TEXT or a BLOB field to be a primary key in MySQL unless you also provide a length of what should be used as a primary key and indexed). A simple Google search on the original issue that was posted by another user two days ago would have sufficed to see that it's a general MySQL incompatibility and not a matter of specific environment.

              luceos Understand that by demanding this level of engagement from a maintainer, is likely to cause frustration or stress on their end.

              I understand that but then imagine the frustration of a ton of users unable to use my forum. Somebody suggested to not update my live forum. Great, is there an easy way to stage-test my live forum? One can't seriously expect me to make a new DB copy, a new Flarum directory copy with proper config edits to reflect the new location, the new DB, then disabling emails, Pusher, PWA, and all stuff that can potentially send emails and notifications to production users while testing a staged copy. All that in order to test any new update of an extension.

              luceos offer to buy Jasper a coffee (or tea) to boost their morale and act as an incentive to resolve the issue you encountered.

              You know that I've contributed to Flarum, to you, and other devs. But I don't agree that I should pay in order for things to get fixed. I usually pay for a good work or if I have a proposal.

              I appreciate what Jasper has made and I thank you. But I really hope that he can find some time to iron out issues in a timely matter after a major rehaul. Frankly speaking, I didn't update this extension explicitly. I’m not SEO obsessed. I just perform regular Flarum upgrade/migrate/cache-clear on my forum and for 3 years I've never had any major issues with that approach. It's only this morning that I encountered the migration error that I realized there's been such a major overhaul with this extension and the migration doesn't work with MySQL.

              I have a more general question. My forum is currently well positioned in Google searches and we get new users that found us on Google. I’ve never been really obsessed with SEO and have never done anything besides installing this extension and putting a bunch of keywords. What will happen if I just remove this extension and not use it anymore. Is any adverse change in Google results expected?

                v2.0.3 | Fixed migration issue

                Thanks for the PR luceos ! Just got home so I tagged v2.0.3 with your changes merged! This would fix the migration issue users have 🙂

                CyberGene What will happen if I just remove this extension and not use it anymore. Is any adverse change in Google results expected?

                Good question! I don't think it will really affect your ranking, but Google or another search engine might index your site differently. Also, the extension does not only help indexing (providing the necesery tags and tell the engine what page type is a discussion, a user page or a tag page), it also adds the necesery description for that page when people share a page on social media. For example, if you share a forum post on Facebook or Twitter and don't have the extension installed, they'll see the general forum image, title and description (so the embed is just about the forum).

                With this extension installed, it will personalize the page embed on the platform with the actual discussion title, a short description and even a custom image if one exists for the page. So it really depends if that's really important to you.

                On the left site is an example how a discussion will be shown on social media without extension, on the right side with info.

                CyberGene So, apparently my forum is broken now. I’d appreciate it if you can fix this as quickly as possible. I see the same error has already been reported and as you can see there’s a pretty straightforward explanation in StackOverflow. Instead of waiting for a reply from the other guy who reported it, you could have fixed it already… Guys, please be more proactive in future, especially after major reworks of extensions.

                Don't get me wrong, it was just such an update that it was a scary one for me as well since I know many forums rely on it (also, I had to update three extensions at the same time to make sure they kept compatible with eachother). I tested many situations, but this MySQL error wasn't appearing on production forums I tested it on before releasing. When the user reported that MySQL error message, it was in the screenshots which I didn't notice, I was focussed on the provided code-block with the Base table or view not found error message 👀

                Hope you'll still like the extension though 🙂

                  I disabled, purged and removed this extension yesterday after I was having the migration issues I reported. I have just re-installed the extension and it's reported as 2.0.3 already but I still see the old interface and don't see the new meta UI. Tried update/migrate but it says no updates available and the migrate doesn't do anything. Somehow the failed migration from yesterday is causing the extension to just keep using the old interface and the new functions won't appear.

                  How can I forcefully reinstall this extension. I can start from scratch, I don't care.

                  P.S. Ahh, never mind, the new meta editor is per-discussion, just opened it. OK, so everything works now, thank you for this new version of the extension 🙂

                    Hey meihuak , have you tried running composer require v17development/flarum-seo ^2 ?

                    CyberGene P.S. Ahh, never mind, the new meta editor is per-discussion, just opened it. OK, so everything works now, thank you for this new version of the extension 🙂

                    Awesome, glad you found out! If you have any feedback, make sure to let us know 😃

                      17 days later

                      JasperVriends

                      v2.0.3

                      An error occurred while trying to load this page.

                      in the server log, there is only one error "[2024-11-05 03:18:12] flarum.ERROR: Error: Call to a member function getDisplayNameAttribute() on null in /***vendor/v17development/flarum-seo/src/Page/DiscussionBestAnswerPage.php:153"