Hello,
I just try to drush updb the upgrade of Metatags that just installed.
Problem/Motivation
$ drush updb
--------- ---------------- ------------- ---------------------------------
Module Update ID Type Description
--------- ---------------- ------------- ---------------------------------
metatag remove_robots_ post-update Remove 'noydir', 'noodp' ROBOTS
noydir_noodp options from meta tag entity
fields.
--------- ---------------- ------------- ---------------------------------
Do you wish to run the specified pending updates? (yes/no) [yes]:
>
> [notice] Update started: metatag_post_update_remove_robots_noydir_noodp
> [error] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'patricegr_publicitempro.user_revision__field_metatag' doesn't exist: SELECT "user_revision__field_metatag"."entity_id" AS "entity_id", "user_revision__field_metatag"."revision_id" AS "revision_id", "user_revision__field_metatag"."langcode" AS "langcode", "user_revision__field_metatag"."field_metatag_value" AS "field_metatag_value"
> FROM
> "user_revision__field_metatag" "user_revision__field_metatag"
> WHERE ("bundle" = :db_condition_placeholder_0) AND (("field_metatag_value" LIKE :db_condition_placeholder_1 ESCAPE '\\') OR ("field_metatag_value" LIKE :db_condition_placeholder_2 ESCAPE '\\')); Array
> (
> [:db_condition_placeholder_0] => article
> [:db_condition_placeholder_1] => %noodp%
> [:db_condition_placeholder_2] => %noydir%
> )
>
> [error] Update failed: metatag_post_update_remove_robots_noydir_noodp
[error] Update aborted by: metatag_post_update_remove_robots_noydir_noodp
[error] Finished performing updates.
What can I do, please?
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | Screenshot 2023-06-08 215122.png | 30.75 KB | jabastin arul |
| #9 | metatag-n3363189-9.patch | 3.39 KB | damienmckenna |
Comments
Comment #2
damienmckennaOh dear.
The code assumes that entities with the Metatag field would have revisions, which is clearly not the case for the User entity type.
Bumping the priority. This needs a fix.
Comment #3
damienmckennaI added this to the list of known issues for the 8.x-1.24 release.
Comment #4
damienmckennaComment #5
damienmckennaWill need to expand the test coverage to make sure the data is correct.
Comment #6
jvizcarrondo commentedSame problem with commerce_store module
Error: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydatabase.commerce_store_revision__field_meta_tags' doesn't exist: SELECT "commerce_store_revision__field_meta_tags"."entity_id" AS "entity_id", "commerce_store_revision__field_meta_tags"."revision_id" AS "revision_id", "commerce_store_revision__field_meta_tags"."langcode" AS "langcode", "commerce_store_revision__field_meta_tags"."field_meta_tags_value" AS "field_meta_tags_value" FROM "commerce_store_revision__field_meta_tags" "commerce_store_revision__field_meta_tags" WHERE ("bundle" = :db_condition_placeholder_0) AND (("field_meta_tags_value" LIKE :db_condition_placeholder_1 ESCAPE '\\') OR ("field_meta_tags_value" LIKE :db_condition_placeholder_2 ESCAPE '\\')); Array ( [:db_condition_placeholder_0] => blog [:db_condition_placeholder_1] => %noodp% [:db_condition_placeholder_2] => %noydir% )in metatag_post_update_remove_robots_noydir_noodp() (linea 253 de /var/xxxx/web/modules/contrib/metatag/metatag.post_update.php).
Comment #7
damienmckennaComment #8
damienmckennaSome minor changes to the update script.
Comment #9
damienmckennaJust the changes to metatag_post_update_remove_robots_noydir_noodp().
Comment #10
uditrawatTested with metatag 8.x-1.24, it is working.
Comment #11
floown commentedThank you Damien.
I have done in the metatag folder a:
It's for noobs, like me ^^
Regards
Comment #12
jvizcarrondo commentedThe patch #9 works with Commerce Store
Regards
Comment #13
damienmckennaThank you all for the reviews, this change will be committed in a few days and released in 8.x-1.25.
Comment #16
damienmckennaI'll do a separate task to add a Metatag field to the User entity type so that we can add test coverage for this scenario.
In the meantime this is good to go, thank you for the reviews.
This fix will be in 8.x-1.25 which I intend to release in a few days.
Comment #17
jabastin arul commentedThis is not yet resolved and I getting the issue still on my website.
Comment #18
damienmckennaJabastin: Did you update to 8.x-1.25?
Comment #19
jabastin arul commentedYes. I have updated the 8.x-1.25. But still issue exist. I need quick help for fix this issue.
Comment #20
jabastin arul commentedmetatag remov post-update Remove 'noydir', 'noodp' ROBOTS
e_rob options from meta tag entity fields.
ots_n
oydir
_nood
This update is getting failed again and again.
Comment #21
damienmckennaJabastin: How many Metatag fields do you have on your entities? How many would you say have values set for the "robots" tag?
Comment #22
jabastin arul commentedDamienMcKenna: I have only one Metatag fields in one content type. I am not tagging the " "robots" in any where
Comment #23
jabastin arul commentedI am getting the issue in page content type and I have enabled the default setting only.
Comment #24
damienmckenna@Jabastin: Please open a new issue and we can dig into this further. Thank you.
Comment #25
jabastin arul commentedAdd a new issue.
https://www.drupal.org/project/metatag/issues/3366933
I need a quick fix for that. Please help me.