I am getting the following link line
http://www.soccer-wikki.info/?q=emailpage%26nid%3D18
which is automatically generated.

This is causing in page not found.

Whereas http://www.soccer-wikki.info/?q=emailpage&nid=18 is ok, but this a manual input.

Comments

seaneffel’s picture

Its happening with my recently upgraded 4.7 emailpage module. It seems that it is using some sort of ascii code to generate symbols instead of the character itself.

I changed this link generated from the module

www.cctvcambridge.org/emailpage%2526nid%3D2

to

www.cctvcambridge.org/emailpage&nid=2

and it works.

So the question is how come this is happening and what fixes do I make to the module to fix it?

Thanks!

RaRi’s picture

I guess that you are not using the correct codepage for your editor (environment).
But it seems that this question should be better answered by an expert .. *g

chrislynch’s picture

This can be fixed if you change the call to the l() function to have the query string at the end, rather than in the link itself. I think the l() function is trying to format out the ampersand and equals signs as if they were data, not seperators.

My call to l() in emailpage now looks like this:

>
l(t('email this %type', array('%type' => t($e_l_t))), "emailpage", array('title' => EMAIL_PAGE_TITLE), 'nid=' . $node->nid);
<

and it works fine.

fernao’s picture

My line is:

$links[] = l(t('email this %type', array('%type' => t($e_l_t))), "emailpage&nid=$node->nid&cid=$node->cid", array('title' => EMAILPAGE_TITLE), NULL);

The correct url should be:
http://site.org/emailpage?nid=1949

... but I'm having the same problem, getting a wrong url:
http://site.org/emailpage%2526nid%3D1949

any ideas?

AjK’s picture

Best advice is to create an issue for this in the projects issue queue. Something's deffinitely gone wrong here. It seems from the code that you need "clean urls" switched on.

The correct url should be: http://site.org/emailpage?nid=1949

That's not actually correct. The correct URL that the module tries to generate is http://site.org/emailpage/1949 and as you can see, that needs clean urls enabled to work. Without clean urls the link should be http://site.org/emailpage&q=1949