Needs review
Project:
CCK Redirection
Version:
5.x-1.0
Component:
User interface
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2008 at 10:41 UTC
Updated:
13 Aug 2012 at 18:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
damienmckennaAm also seeing this problem using the built-in search engine, any nodes that have a redirect URL will automatically run the redirect action if they show up in the search results.
Comment #2
damienmckennaThis appears to be a core flaw with drupal_goto, which cck_redirection relies upon.
Comment #3
damienmckennaShould the cck_redirection_nodeapi() function check to see if the full node is being displayed or a teaser? Could the "Display Fields" settings be used to decide whether the URL is followed or not?
Comment #4
damienmckennaLooking at get_defined_vars() from within cck_redirection_nodeapi() I don't see a clear way of identifying whether the teaser or full view should be used? Any hints? tyvm.
Comment #5
damienmckennadrupal_goto() only exists if drupal_get_cron() is true. Maybe this should be expanded to be a special-case "please don't do run any drupal_goto calls" override that could be toggled by certain types of calls, e.g. search results, maybe a flag on views? Just trying to make sense of this.
Comment #6
damienmckennaHow about this:
This stops drupal_goto() from affecting the search engine results view.
Comment #7
damienmckennaScrap that, this patch breaks the search engine. Sad but true. Fixed patch will be forthcoming.
Comment #8
damienmckennaFixed patch:
Comment #9
doc2@drupalfr.org commentedJust in case my case could help, IF you use the patch against max_allowed_packet error because of #218187: Views cache too large, you MAY face an error message such as
Duplicate entry [node] for key 1 query: INSERT INTO search_index (word, sid, type, score) VALUES (values) dans .../drupal/includes/database.mysql.inc at line 172.with this patch.I used it eventhough I don't use CCK redirection because I thought that the hook drupal_goto() being global could have affected other search processes or, on cron runs, index processes. I was probably wrong.
Comment #10
darren ohI think the proper solution is to only do redirection when the node is viewed as a page, as the code comments claim is done.