I am trying to add prepopulate query strings to the link in my footer of the view.
I try to add link path like thus:
node/add/image?edit[field_gallery][0][nid][nid]=%1
and the resulting link on the page becomes this:
node/add/image%3Fedit%5Bfield_gallery%5D%5B0%5D%5Bnid%5D%5Bnid%5D%3DGallery
Which I don't know how to work around. There is probably an urlencode or something going on. Is it neccessary?
I also tried to add stuff into the Link querystring, like this:
edit[field_gallery][0][nid][nid]=%1
But it doesn't work, it just disappears upon updating the "Link querystring" form field. I also tried with "?" in front of the query string.
Any help would be apprecieated; for the moment I will just remove locally any urlencoding I can find in the module.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | urldecode-link-render-1104794-4257962.patch | 617 bytes | pkej |
Comments
Comment #1
pkej commentedI changed line 99 in the file views_handler_area_link.inc from:
to:
And now the links work as they should.
Comment #2
pkej commentedA patch, I hope.
Comment #3
pkej commentedI guess it isn't a bug, but a natural side effect of using l(). Therefore this is probably å feature request.
Comment #4
geek-merlini had a similar thing with views filters and the encoded string DID work there.
did you test that it does NOT work with prepopulate?
in that case i think it might be a prepopulate issue: the module should use urldecode there.
Comment #5
anybodyAnything new here?
I think we should discuss this and review the results to bring this issue to an end?
Comment #6
kristofferwiklund commentedI have done some testing with latest version of this module (7.x-1.1) and prepopulate (7.x-2.1) and it works.
Given link path: node/add/news
Given link querystring: edit[title]=test
It produces this link: node/add/news?edit%5Btitle%5D=test
But clicking on the link the Title field is populated with test for a new News node.
And if this problem is for Drupal 6 and I am sorry to inform that it is deprecated.