Devel page execution message gets included into search field when opening existing link.

Linkit echos existing link and then die, instead we could return json with drupal_json_output(). Which will solve this issue.

See attached patch

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anon’s picture

Status: Patch (to be ported) » Needs review

First its need a review, then if it ok, we will patch this to 6.X =)

anon’s picture

Status: Needs review » Needs work

Me and vikfroberg has a better solution to this. Unfortunately I forgot the patch at work.

anon’s picture

Assigned: vikfroberg » Unassigned
function linkit_search_styled_link() {
  if (isset($_GET['string'])) {
    $string = check_plain($_GET['string']);
    $matches = module_invoke_all('linkit_get_search_styled_link', $string);
    
    // return value as an json object
    drupal_json_output(isset($matches[0]) ? $matches[0] : '');
  } else {
    drupal_json_output('');
  }
}
anon’s picture

After some testing my conclusion is that return the respone in JSON format solves this, but to send it as text/plain seems more correct.

anon’s picture

Status: Needs work » Fixed
FileSize
858 bytes
844 bytes

Devel tell us that if the page output any Content-type http headers in this array
$formats = array('xml', 'javascript', 'json', 'plain', 'image', 'application', 'csv', 'x-comma-separated-values');
It will not show the "devel footer".

So if we add the header in this (linkit_search_styled_link) we are all clear.

I have commited this two patches.

Status: Fixed » Closed (fixed)
Issue tags: -Devel, -json

Automatically closed -- issue fixed for 2 weeks with no activity.