ethercreative/seo

SEO plugin is installed, but unavailable

joshwalsh opened this issue · 7 comments

Description

Hello. Out of the blue today I started receiving this error. We've been using SEO without any issue for a long time, so I'm not sure what caused this. Clicking the "Enable" button doesn't do anything (it's already enabled, and I've tried disabling and re-enabling it). I'm afraid to uninstall it without losing our content (locally wouldn't be an issue).

Screen Shot 2021-12-21 at 4 55 59 PM

Screen Shot 2021-12-21 at 4 58 40 PM

Any suggestions?

  • Craft version: 3.7.26
  • SEO version: 3.7.4
  • PHP version: 7.4.12

How strange! If you do have the site running locally, could you try deleting the vendor folder and composer.lock file and then try composer update?

Hi Alex,

Yeah, strange. I actually tried that before opening this ticket (and again just now). I've also tried backing out to an older version of SEO, but has the same effect.

I have isolated the problem to be something within my specific field. I was able to create a new SEO field, remove the old one from the section, and the new field works just fine. So, I must have data out of whack somewhere on that specific field. If I reverse that change (take off my test field and put my original one back) the error comes back.

Is it possible something is out of sync in my project.yaml definition of this field? Below is the contents of my config\project\fields\pageSeo--[hash].yaml

Notice the error message in settings here matches what I see on screen, and is classified as a type: craft\fields\MissingField

contentColumnType: string
fieldGroup: 31f2e552-78d6-4e12-af62-bd6c0e8fcfa2 # Common
handle: pageSeo
instructions: ''
name: 'Page SEO'
searchable: false
settings:
  errorMessage: 'Component class ''ether\seo\fields\SeoField'' belongs to an uninstalled plugin (SEO).'
  expectedType: ether\seo\fields\SeoField
  settings: '{"description":"","hideSocial":"","robots":["","","","","",""],"socialImage":"","suffixAsPrefix":null,"title":[{"key":"1","locked":"0","template":"{title}"},{"key":"2","locked":"1","template":" - {{ siteName }}"}],"titleSuffix":null}'
translationKeyFormat: null
translationMethod: none
type: craft\fields\MissingField
Tam commented

@joshwalsh Can you try running composer dump-autoload -o?

Hey sorry for delay, I hope you had a nice holiday. Here's the result:

❯ composer dump-autoload -o
Generating optimized autoload files
Generated optimized autoload files containing 5619 classes

No issues.

A little follow up here in case it helps.

I had been thinking that we may have a data corruption issue that causes this one SEO field to have this issue. But, I'm no longer sure of that. This problem is happening on 2 different deployments of this app (production and staging) which have completely distinct databases, plus my development environment. I spun up another copy from scratch using the project yaml, and the problem exists there too.

But as mentioned above, if I create a new SEO field, it works fine. I'd rather not lose all my SEO data across the website, but if replacing that field and rebuilding is the only option to fix this I'll bite the bullet and do it.

Hi @Tam

I hope you had a nice holiday break. Do you have any tips for further things I could do to try and resolve this? I'm at the point with my client where this has been broken for about a month, and the only fix I see is to create a new field and populate it manually with content by looking up the current content in the database. With a site this large, that's quite a bit of work, but I'm kinda stuck.

Thank you.

Josh

This issue has been resolved for me. What happened is that the SEO field did not know what type of field it was. Somehow the field type got changed to craft\fields\MissingField in the project.yaml.

It is unclear to me how that change happened. I would guess during an update or migration of some kind. The "uninstalled plugin" error was a red herring that appeared even though the plugin was installed (and otherwise functioning just fine).

I was able to get the field back by editing the project.yaml manually and changing the type to ether\seo\fields\SeoField