Closed (fixed)
Project:
Junk
Version:
6.x-1.2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2011 at 19:08 UTC
Updated:
26 Jan 2011 at 11:50 UTC
Jump to comment: Most recent file
If {junk_node} table doesn't contain the nid of some node, in a view with Junk fields (Move to junk link, Restore link or Delete link) for this node I get the following URLs:
http://example.com/junk/%252Fdelete
http://example.com/junk/%252Frestore
http://example.com/node/%252Fjunk
which means that $nid variable in junk_views_handler_(delete|junk|restore)_link.inc is equal to NULL, and as result we get an extra slash which is being replaced to %252F
I get the correct URL only for nodes which have been moved to junk (so {junk_node} contains the nids of these nodes).
Any idea how to fix this?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | junk_views_handler_delete_link.inc_.patch | 490 bytes | quotesbro |
| #1 | junk_views_handler_junk_link.inc_.patch | 754 bytes | quotesbro |
| #1 | junk_views_handler_restore_link.inc_.patch | 720 bytes | quotesbro |
| #1 | junk_views_handler_junk_link.inc_.after_#1014264.patch | 482 bytes | quotesbro |
Comments
Comment #1
quotesbro commentedI figured out that this problem can be solved by changing
$this->additional_fields['nid'] = array('table' => 'junk_node', 'field' => 'nid');to
$this->additional_fields['nid'] = array('table' => 'node', 'field' => 'nid');in Views handlers files.
I'm attaching 2 patches for junk_views_handler_junk_link.inc: against original .inc file from version 6.x-1.2 and another one, that should be used after patch from #1014264: junk_views_handler_delete_link is used instead of junk_views_handler_junk_link.
Comment #3
AliraSirin commentedNow fixed in 1.3 release. Thanks for the patches!