In the drupal/gallery search the results given contain incorrect links.

?q=gallery&g2_itemId=157

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

Any ideas?

Comments

kiz_0987’s picture

The search function works correctly on my installation. That form of url (g2_itemId=XXX) works fine for me. What happens exactly when you click on the formed link? Is this a public site that we can look at? Does the rest of your embedded G2 installation work correctly?

kos@lab.walkah.net_drupalgallery’s picture

Yes everything else works correctly.

I dont know why its putting that string in the url.

tko’s picture

kizz,

I had pasted the incorrect link the search displays. I only realised now.

The link i posted is what SHOULD be the correct link, but my links look like the following:

?q=gallery&g2_itemId=XXX

I was referring to the 'amp;'

Obviously when I click on those links nothing opens.

tko’s picture

Alright i just realised whats happening, drupal.org is stripping the URL that im trying to post thats why the 'amp;' but I'm talking about is never showing up.

Should have used the preview function eh!

Anyway the link looks like: ?q=gallery&'amp;'g2_itemId=157

I had to put ' ' around it so that it wouldnt get stripped out.

kiz_0987’s picture

Sorry, but I do not know the answer to this. I took a quick look at the code and it looks like the URLGenerator function may be adding the extra '&' into the URL. The code snippet is:

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

Perhaps the G2 support forum may be able to help -- I suggest reposting there.

tko’s picture

Posted topic on G2 forums

http://gallery.menalto.com/node/38221

alexandreracine’s picture

Is this still an issue?

alexandreracine’s picture

Status: Active » Closed (fixed)

No news, closed.