Did a fresh installation of RC1 and created a couple of image ads. The ads work great (both single ad groups and rotations) but I realized the links are broken and contain a additional trailing slash.
Did a fresh installation of RC1 and created a couple of image ads. The ads work great (both single ad groups and rotations) but I realized the links are broken and contain a additional trailing slash.
Comments
Comment #1
jeremy commentedCommitted a fix to remove the trailing slash if there is no hostid.
Comment #2
shane birley commentedI will update those files and test it.
Comment #3
shane birley commentedThat has cleared the trailing slash but the redirects are not resolving to the destination URLs. They were with the previous dev.
Comment #4
jeremy commentedPlease explain your issue fully. What are you trying to do that is not working? Please walk me through it because links are working fine for me.
Comment #5
shane birley commentedThe issue is the URLs are not redirecting. So, all of the ads with URLs like http://www.example.com/ad/redirect/134/, when clicked, don't resolve to the destination URLs entered in the ads. I just created a new test ad but the problem still occurs.
A live example is www.plankmagazine.com - there are two image ads on the side - you will see the URLs direct to the error page.
Comment #6
jeremy commentedHow are you displaying the ads? For some reason adserve_variable('group') is not being set, causing the redirect to fail. (If you add '0' to the end of the URL, the redirect works).
Comment #7
shane birley commentedThe ads are displaying in the auto-generated blocks. Nothing fancy as far as I can tell. Is there something I should look at?
Comment #8
shane birley commentedI just did another fresh installation and I am still getting the same thing. The redirects are not functioning but if you add the zero at the end of the URL (.../###/0) the redirects work.
Comment #9
jeremy commentedAs you've provided a link to your website, here's a link to the debug screen available through the ad module (unless disabled by setting debug=0 in the $conf array in settings.php):
http://www.plankmagazine.com/sites/all/modules/ad/serve.php?q=1&c=file&f...
I can see that it's generating an invalid URL from that input. Furthermore, I believe I've tracked it down to the ad_cache_file module. The following debug URL shows that things work fine if you don't use a cache:
http://www.plankmagazine.com/sites/all/modules/ad/serve.php?q=1&t=21&deb...
I will try to debug the ad_cache_file module. For now, I recommend you disable the cache if you simply want ads to work -- but without the cache performance will certainly be less.
Comment #10
jeremy commentedKnowing where the problem was I decided to take a quick look. I've committed a fix.
Comment #11
shane birley commentedI will add those changes and test.
Comment #12
shane birley commentedI have added the changes to the code and it looks like things are again working. There is a minor change to the URL redirects (added /t22, etc) and the redirects follow correctly. I have tested in new window, same window, etc and they all seem to work without any problem.
You are the best! Thank you! If you require anything, don't hesitate to let me know.