- Issue created by @venkatesh rajan.j
- Assigned to darkdim
- Issue was unassigned.
- Status changed to Needs review
11 months ago 3:01pm 26 January 2024 Please add instructions regarding your solution and how it can be tested.
- 🇺🇦Ukraine darkdim Kyiv
Please add instructions regarding your solution and how it can be tested.
Yes, I will do it.
I'm not sure if the permissions have been added correctly. We can discuss this. - 🇺🇦Ukraine darkdim Kyiv
- Apply patch
- run update db
- action will be added, on /admin/content page check any nodes and get action 'Generate metatag' from drop-down list
- metatags will only be processed for the specified types in /admin/config/content/metatag-ai/content-type
- 🇵🇭Philippines paraderojether
Hi @darkdim,
I reviewed patch #16, and the patch did not apply successfully, I got the error below when applying the patch:
jetherparadero@PrometSources-MacBook-Pro metatag_ai % curl https://www.drupal.org/files/issues/2024-01-31/3415243-option_to_bulk_update_metatags_1.patch | git apply -v % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 8397 100 8397 0 0 12650 0 --:--:-- --:--:-- --:--:-- 12780 Checking patch web/modules/contrib/metatag_ai/metatag_ai.module... Checking patch web/modules/contrib/metatag_ai/metatag_ai.install... Checking patch web/modules/contrib/metatag_ai/src/Plugin/Action/GenerateMetatagAction.php... Checking patch web/modules/contrib/metatag_ai/src/Plugin/GenerateMetatag.php... error: while searching for: namespace Drupal\metatag_ai\Plugin; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Logger\LoggerChannelFactoryInterface; use Drupal\Core\State\State; use GuzzleHttp\Client; error: patch failed: web/modules/contrib/metatag_ai/src/Plugin/GenerateMetatag.php:3 error: web/modules/contrib/metatag_ai/src/Plugin/GenerateMetatag.php: patch does not apply Checking patch web/modules/contrib/metatag_ai/config/install/system.action.generate_metatag_action.yml...
I would also like to suggest creating a merge request so that will be easy for the maintainers to check the code.
Kindly check and advise, please.
Thankyou - Status changed to Needs work
10 months ago 9:16pm 19 February 2024 - Status changed to Needs review
9 months ago 1:27pm 30 March 2024 - Status changed to Needs work
7 months ago 5:14am 20 May 2024 - 🇵🇭Philippines kenyoOwen
Hi darkdim
I applied your patch and it works, but when I run
fin drush cr
andfin drush updb
I got this error and vice versafin drush updb
andfin drush cr
.------------ ----------- --------------- ------------------------------------- Module Update ID Type Description ------------ ----------- --------------- ------------------------------------- metatag_ai 10101 hook_update_n 10101 - Implements hook_update_N(). ------------ ----------- --------------- ------------------------------------- Do you wish to run the specified pending updates? (yes/no) [yes]: > yes > [notice] Update started: metatag_ai_update_10101 > [error] The "generate_metatag_action" plugin does not exist. Valid plugin IDs for Drupal\Core\Action\ActionManager are: comment_unpublish_by_keyword_action, node_unpromote_action, node_unpublish_by_keyword_action, node_assign_owner_action, node_promote_action, node_make_sticky_action, node_make_unsticky_action, user_cancel_user_action, user_unblock_user_action, user_block_user_action, user_remove_role_action, user_add_role_action, action_send_email_action, entity:save_action:block_content, entity:save_action:comment, entity:save_action:file, entity:save_action:menu_link_content, entity:save_action:node, entity:save_action:taxonomy_term, entity:save_action:user, entity:unpublish_action:block_content, entity:unpublish_action:comment, entity:unpublish_action:menu_link_content, entity:unpublish_action:node, entity:unpublish_action:path_alias, entity:unpublish_action:taxonomy_term, entity:publish_action:block_content, entity:publish_action:comment, entity:publish_action:menu_link_content, entity:publish_action:node, entity:publish_action:path_alias, entity:publish_action:taxonomy_term, action_goto_action, action_message_action, entity:delete_action:comment, entity:delete_action:node > [error] Update failed: metatag_ai_update_10101 [error] Update aborted by: metatag_ai_update_10101 [error] Finished performing updates.
Basically what I did before applying your patch is add a metatag field to the basic page content type. My Drupal local is newly generated and also tested your patch wherein I only enabled the
Metatag
andMetatag AI generator
and got the same error, tested anotherfin drush updb
with all the metatag modules are enabled. Please correct me if what I did is wrong to get the error.Thanks,
Ken. - 🇫🇷France chipway
Tested today on Drupal 10.2.7 and PHP 8.3.
Patch applies, Generate metatag Action appears and do the job.
I just got 2 Error messages after running Bulk updates:
• Deprecated function: Creation of dynamic property Drupal\metatag_ai\Plugin\GenerateMetatag::$state is deprecated in Drupal\metatag_ai\Plugin\GenerateMetatag->__construct() (line 70 of modules/contrib/metatag_ai/src/Plugin/GenerateMetatag.php).
• Deprecated function: Creation of dynamic property Drupal\metatag_ai\Plugin\Openai::$state is deprecated in Drupal\metatag_ai\Plugin\Openai->__construct() (line 71 of modules/contrib/metatag_ai/src/Plugin/Openai.php).Bulk generation helps a lot.
- Status changed to Needs review
6 months ago 6:54am 27 June 2024 - 🇵🇭Philippines kenyoOwen
I was able to fix the generated metatag action issue.
Please review. - First commit to issue fork.