backdrop-contrib / metatag

Add structured metadata, aka "meta tags", for various pages on your site.
GNU General Public License v2.0
3 stars 15 forks source link

PHP Fatal error: Class 'SearchApiAbstractService' not found in ../metatag_search_test.module on line 22 #64

Closed alanmels closed 2 years ago

alanmels commented 3 years ago

Was trying to enable the coder_upgrade module when happened this:

brush en coder_upgrade -y
The following project does not exist in your Backdrop installation: coder_upgrade
Do you want to download the project? (y/n): y
Project coder_upgrade (1.x-1.0.2-beta) downloaded to /home/username/public_html/./modules/coder_upgrade.                                                       [success]
The following extensions will be enabled: coder_upgrade
Do you really want to continue? (y/n): y
PHP Fatal error:  Class 'SearchApiAbstractService' not found in /home/username/public_html/modules/metatag/tests/metatag_search_test.module on line 22
Brush command terminated abnormally due to an unrecoverable error.                                                                                              [error]
Error: Class 'SearchApiAbstractService' not found in /home/username/public_html/modules/metatag/tests/metatag_search_test.module, line 22
herbdool commented 2 years ago

I can confirm this.

bugfolder commented 2 years ago

There's a PR in on Coder Upgrade that (I think) fixes this. Testing solicited!

https://github.com/backdrop-contrib/coder_upgrade/pull/60

quicksketch commented 2 years ago

Although Coder no longer throws an error, we can improve Metatag module's code here a bit by moving this class to a dedicated file instead of putting it directly in the .module file, which is recommended by the autoloader change record: https://docs.backdropcms.org/change-records/the-class-registry-has-been-replaced-with-a-static-class-map