Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I've been trying to create a post method in Drupal 8, but without positive result.
I even searched the core code, in Drupal Answers, in Drupal Documentation.
Here my issue:
http://drupal.stackexchange.com/questions/214706/create-a-post-method-in...
Someone may know that something is wrong?
Greetings.
Comment | File | Size | Author |
---|---|---|---|
#3 | Selection_054.png | 73.26 KB | rpayanm |
#3 | Selection_053.png | 5.1 KB | rpayanm |
Comments
Comment #2
Wim LeersPlease export the relevant configuration and post it here.
Comment #3
rpayanmThis is my code:
custom_rest/src/Plugin/rest/resource/CustomRestResourceUserCheck.php:
I have activated:
I tested this functionality in Postman but I get the following error:
Comment #4
rpayanmComment #5
rpayanmDrupal version: 8.1.9
Comment #6
Wim LeersThanks for your code. But I asked for your configuration:
Comment #7
rpayanmSorry, you mean this:
Comment #8
rpayanmComment #9
dawehnerYou need a different path:
why? I have no idea. Its some weird RFC stuff going on, in which world this makes sense.
Comment #10
Wim LeersRight. This will become more clear once #2293697: EntityResource POST routes all use the confusing default: use entity types' https://www.drupal.org/link-relations/create link template if available lands, because then there will be a bunch of examples in core. Will land in 8.3.x.
Comment #11
Wim LeersComment #13
squinternata CreditAttribution: squinternata commentedI have the same error not solved!!!
please help!!
A
Comment #14
cilefen CreditAttribution: cilefen commented@squinternata Please open a new issue and link it to this one.