-2

on a fully developed drupal, some contributors noticed me that the contextual menu links are broken on a limited set on pages.

After a quick check i see that all those pages have a broken XHR request on the following URL (http error code 400) :

https://mywebsite.local/contextual/render

seeing the arguments sent to this URL, it seems it's a part of the module, here is a sample of the POST data sent in a page where contextual menu is not working :

ids[]
0   "paragraph:root_parent_type=node&root_parent=9662&paragraph=11155:changed=1694443610&langcode=fr"
1   "paragraph:root_parent_type=node&root_parent=9662&paragraph=12839:changed=1694443610&langcode=fr"
2   "paragraph:root_parent_type=node&root_parent=9662&paragraph=11161:changed=1694443610&langcode=fr"
3   "paragraph:root_parent_type=node&root_parent=9662&paragraph=11166:changed=1694443610&langcode=fr"
4   "paragraph:root_parent_type=node&root_parent=9662&paragraph=11170:changed=1694443610&langcode=fr"
5   "paragraph:root_parent_type=node&root_parent=9662&paragraph=11167:changed=1694443610&langcode=fr"
6   "paragraph:root_parent_type=node&root_parent=9662&paragraph=11168:changed=1694443610&langcode=fr"
7   "paragraph:root_parent_type=node&root_parent=9662&paragraph=11169:changed=1694443610&langcode=fr"
8   "paragraph:root_parent_type=node&root_parent=9662&paragraph=12807:changed=1694443610&langcode=fr"
9   "paragraph:root_parent_type=node&root_parent=9662&paragraph=11171:changed=1694443610&langcode=fr"
10  "/node/9623/edit"
11  "/node/9623/edit"
12  "paragraph:root_parent_type=node&root_parent=9662&paragraph=12882:changed=1694443610&langcode=fr"
13  "paragraph:root_parent_type=node&root_parent=9662&paragraph=12880:changed=1694443610&langcode=fr"
14  "paragraph:root_parent_type=node&root_parent=9662&paragraph=12881:changed=1694443610&langcode=fr"
15  "block:block=popuppopin:has_overrides=0&langcode=fr|settings_tray::langcode=fr|block_content:block_content=2852:changed=1716213473&langcode=fr"
tokens[]    […]
0   "Gxw8Eh5DTqVpjVXCWk7OnBjizfcm6YWjQhtQjfRWvHM"
1   "M5dZ9EvRyOaCxb4pr4ui_5jINRyqyazYBei2dA3ECn8"
2   "o9QukU7N29blBZ9r4mCit5qDJHNyRYO_rnHGGbedGJk"
3   "xPPuHeQTPJkUpgNeDGItl9mv3DpRlNi8YqP1bu-3Gak"
4   "6XThPfpjHrIMPesfDa4JBTKm2lqUAIfF2zFCet_vKxs"
5   "MgYcM7fqppdAiKN1U4jcHUgmmeTTF4IeUfdeoUoOhYU"
6   "VSj25JGfXqskuQCXct_1MgIlMHhNsPeI6aUK3QqOXuE"
7   "wGVSPlYEmtDA6TBpl93ctjdE4fnDQkRZXu2JJZLbMQQ"
8   "kQDMT8xEFX0QTtX8SKQPlxk6cNOrnTV5J5Cqd1kTdJk"
9   "4DYtIYCWfQWEx8FTq_rXKOnFkDiAcCgipZbETUc1Dvs"
10  ""
11  ""
12  "U6ohYn3yM9L4AN_9NwWgVMZZ6CQ4bplImyAWBrvWJZo"
13  "RyL9NcIx4cCKpYC3NRBs-J167uile1-xLPpJH9w8Hvg"
14  "UnOrBSfkU3MFb55gmSsAufDxXhYqSAtMnFQfUDagjYw"
15  "6C5ZJw7eVMzOmm64qqZCybiq1sKZucTdIBzBOkCkHfg"

i checked the contextual links module permissions and tested with all permissions enabled, the problem persists, so it's not related to module permissions to me

2
  • 1
    Where is the link 10 and 11 coming from? Check the HTML source in the browser for the attribute data-contextual-id.
    – 4uk4
    Commented May 20 at 16:03
  • I went to the concerned paragraph template, there was a static data-contextual-id="/node/9623/edit", likely a remnant from the development phase. Thanks for pointing this out, the issue is resolved by removing it :)
    – SupFrig
    Commented May 21 at 8:17

1 Answer 1

0

as pointed out by @4uk4 the problem was a static data-contextual-id in the page that was causing the error 400 on the URL https://mywebsite.local/contextual/render

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.