G2 + Drupal - Search Results URL Problem

kos

Joined: 2005-10-08
Posts: 6
Posted: Tue, 2005-10-11 06:59

In the gallery2+drupal search the results given contain incorrect links.

?q=gallery&g2_itemId=XXX

all results get given links but there is a part in the url 'amp;' which is breaking them.

the correct urls shoud be: ?q=gallery&g2_itemId=XXX

Any ideas?

 
kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Tue, 2005-10-11 13:17

This does not seem to be (directly) a Drupal-embedded issue. The search works and generates the correct URLs on my installation. Looking through the gallery.module (Drupal) code here is a relevant snippet:

$find[] = array('title' => $result['fields'][0]['value'],
'link' => $urlGenerator->generateUrl(array('itemId' => $result['itemId'])),
'type' => $module['name'],
'snippet' => implode('<br />', $excerpt));

This seems to just call the URL Generator to make the URL, so it should not give the extra '&amp;'. Any ideas why it would do this, from the G2 team?

 
kos

Joined: 2005-10-08
Posts: 6
Posted: Tue, 2005-10-11 13:54
 
kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Sun, 2005-10-16 21:47

I've uploaded a patch for the search problem at http://drupal.org/node/34301. Let me know if it works or not for you.