Have you tried an uninstall/re-install of the module? Perhaps a goofy value made its way into the table when it was installed. I suspect this would fix the problem. If not, can you provide more details regarding the links such as what is the url you are passing in and what is the link that is being generated? Also, is the url being hard coded into the linklocker tag, or is it being generated from a weblog?
I seem to be having a similar problem with this module. I’ve passed a URL which I have confirmed as valid and the string which the module is generating is as such:
http://mysite.com/?ACT=31&url=1&linklocker=MTIxVNjgy7NDU5ENw==LeODAmuNi4x1Ni4axOTcz=eMQz==eed3NpdwGVfd4XJsfHXVwbFG9hZfHMmI0zQ3O42dlbrmVyYmWwmI4zQ3Oy0JlbRl9Hbf3NzXV0ZPT2EFfMwTZfT1WF5XSzIwMYDcuciGRme0MA==Eeeo
However, if I look at the page source the ampersands are encoded, I guess that’s ok? When I click on the link I end up with:
http://mysite.com/��]Wݛ]�YɈ�
���[��[ ��
�Й[������ѓ�W�M��X^W̌
˜
which doesn’t seem at all right… and obviously does not present me with said file… any ideas?
Edit: Ok, so that URL didn’t really embed as I expected! Needless to say it’s not what should be happening!
Hi Nathan,
I cannot guarantee that the module will work with MSM, as I don’t have this and therefore cannot test or code for it. As for the code you sent - the actual code generating the URL is missing. I know you said you hardcoded this URL (since it is dynamically generated) and it still didn’t work, but I also notice that the closing brace “}” is missing from the call to the module. Is it missing in your template file as well?
Ok, I just tested on another site using a template with nothing but the LinkLocker code and I get a blank page instead of the file download. Now I ‘think’ I have got it working.
I think the main issue is that it’s quite particular about the format of the URL (I think this was said before also). It has to be the full path including the domain name etc. Previously I was prefixing with {site_url} but when on this simple test I switched to a full URL it started worked. Trying to debug the original scenario now as this is still failing. I’ll post back here if I can work out what the issue is. 😊
Ok, it’s all working. In the end it was a smorgasbord of problems with my code that were causing the module to walk past me in the street without so much as a glance. Summary:
My URLs although base64 and url encoded when passed to the page, were not url encoded when they were passed to LinkLocker.
I was building my URL with {site_url} at one point, {path=…} at another. Neither work, you need to use the absolute hard coded base url… http://www.mysite.com/…
3: Not enough Coffee.
So thanks Brad for all your help. I’m there now and the module is working a treat. Fantastic bit of work on your part. Kudos.
Considering that the module will not function with files on another server, is it worth changing the URL parameter so that it expects a path only, not a full URL? Might save you some forum time. 😛
So the URL parameter would never accept a full URL with ‘http://www…’ but only a path ‘/uploads/myfile.pdf’ which would then be prefixed with the domain name in your code… :?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.