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.
Hi,
I have path /something/{my_entity}
and I am creating alias /something/[my_entity:title]
. If I run bulk generation I will get the "..parameter was not converted for path" error message from ParamConverterManager and I am wondering if this issue with Drupal core(and therefore it is ok) or if this comes from Pathauto?
Comment | File | Size | Author |
---|---|---|---|
#8 | catch-route-param-not-converted-2656274-8.patch | 740 bytes | danielbeeke |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedivanjaros created an issue. See original summary.
Comment #2
juampynr CreditAttribution: juampynr at Lullabot commented@ivanjaros, can you provide a list of steps to reproduce the issue? Then I could debug it.
Comment #3
Saphyel CreditAttribution: Saphyel as a volunteer commented@juampynr I have the same issue, The steps to replicate is configure pathauto for use the URL "/news/[node:title]" to article, after this create a view with contextual filters "Content: Has taxonomy term ID" and finally try to create add a node .. you'll get the error. I can share with you a profile ready for test this.
Comment #4
Dave ReidThis sounds very similar to #2655874: Improve error handling for "The given alias pattern always matches the route" - let's merge this with that ticket.
Comment #5
Dave ReidComment #6
danielbeeke CreditAttribution: danielbeeke commentedI think this issue should still be open.
After testing '8.x-1.0-alpha2+5-dev' on 14 march I get
Drupal\Core\Entity\EntityStorageException: The "contact_form" parameter was not converted for the path "/contact/{contact_form}" (route name: "entity.contact_form.canonical") in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 757 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
It get's triggered on bulk update but also on a node save via the edit form.
Comment #7
danielbeeke CreditAttribution: danielbeeke commentedI am debugging and will update if I find results.
Comment #8
danielbeeke CreditAttribution: danielbeeke commentedI have created a patch and would like to know if this is the right way to fix this.
When ParamNotConvertedException is thrown the function returns false.
Comment #9
danielbeeke CreditAttribution: danielbeeke commentedComment #10
jeroen_drenth CreditAttribution: jeroen_drenth as a volunteer commentedI've tested the patch. Look good and it solves the issue.
Comment #11
alexpottWe should have some tests for this...
Comment #12
BerdirHave a look at #2718375: Route collision reported when alias matches a different language, I hope that will solve your problem as well. If that's the case, please close this as a duplicate.
Comment #13
danielbeeke CreditAttribution: danielbeeke commentedI think #6 comment and issue is a little bit different from http://drupal.org/node/2718375.
The patch here fixes my issue. @Berdir have you read the patch from this issue?
It is simple and fixes one thing, the bug I had and I thought this issue was about.
Do you think it needs a different way of solving?
To clarify what I think this issue is about, if you have a node with an alias "/contact/about-us" drupal core contact modules tries to load the contact form "about-us" and if that form does not exist it throws ParamNotConvertedException (parameter was not converted for path)
Comment #14
BerdirThe other issue fixes that problem and many others as well because it doesn't do route matching or upcasting anymore.
This just fixes one symptom, the other issue attempts to solve the underlying problem.
Comment #15
Saphyel CreditAttribution: Saphyel as a volunteer commented#14 if this issues is older, why is this one the duplicated?
Comment #16
danielbeeke CreditAttribution: danielbeeke commented@Berdir, I will test the issue tomorrow and report back to this issue.
Comment #17
alexpottComment #18
Anonymous (not verified) CreditAttribution: Anonymous commentedSaphyel: that's quite common practice here. It takes credit from the original poster(s) but live discussion and patches have always priority.
Comment #19
ArlaI had the same problem, tested the patch in #2718375: Route collision reported when alias matches a different language successfully.
Comment #20
BerdirI've committed that issue now. Thanks everyone who tested, I'm pretty sure this fixed all the related problems around that error.