Mcinsley
Forum Replies Created
-
Forum: Plugins
In reply to: [Amazon Affiliate Link Localizer] Not working…Posted the link on a forum to have people test it since proxies aren’t especially reliable. Seems to be working everywhere now.
Odd that you’d see so many downloads and only just stumble upon this issue. Might be because the server is hosted on Windows when most use Linux… I really do need to switch to Linux.
Thanks again.
Forum: Plugins
In reply to: [Amazon Affiliate Link Localizer] Not working…Ah right, I wasn’t sure where to add the error reporting.
Adding it to ajax.php has fixed the problem. Also it appears that your script is more than capable of handling links to the same product on different versions of Amazon simultaneously without issue.
Just added a few different products from different sites to https://www.mcinsley.com/testpage and they all appear to be functioning properly.
I’ll see if I can find a proxy without transparent settings just to double check but it seems to be solved.
Do you think this issue was caused by FastHosts php.ini settings then? Might be worth adding that error reporting override to the ajax in the next version if it doesn’t cause other issues/isn’t considered bad practice. Thanks for your help.
Forum: Plugins
In reply to: [Amazon Affiliate Link Localizer] Not working…Ok I am fairly new to PHP so this is rather pushing my knowledge of it now, therefore I may be wrong but…
The error reporting level is set in php.ini. FastHosts being FastHosts, it does not give the user access to this. It does not surprise me at all that they have set it to an overly high level.
However according to a couple posts online I should be able to override this for WordPress in wp-config.php. I have just tried to set it to (E_ALL ^ E_NOTICE) but it doesn’t appear to have made a difference.
It is now set to as off as off gets with:
@ini_set(‘log_errors’,’Off’);
@ini_set(‘display_errors’,’Off’);
@ini_set(‘error_reporting’, 0);
define(‘WP_DEBUG’, false);
define(‘WP_DEBUG_LOG’, false);
define(‘WP_DEBUG_DISPLAY’, false);I copied that from the WordPress codex so I assume that it should work. I have reinstalled the plugin but it is still only working on .co.uk links.
It would not surprise me to find that FastHosts is being weird again and that its settings in php.ini are causing this. I’ll email them to see if they can change the settings. I assume the errors are just measly syntax and formatting matters which shouldn’t cause a problem?
Forum: Plugins
In reply to: [Amazon Affiliate Link Localizer] Not working…That sounds plausible but doesn’t seem to be the problem in this instance. I have just updated the books page and changed them all to .com
The ones with my associates ID still maintain it but the other two do not have it attached. None of them are getting switched to the .co.uk either it seems.
I have also just grabbed two links off amazon.com. The first with it’s full URL and the second changed to exec/obidos/ASIN in case something in the formatting was causing the issue. Neither are getting the affiliate ID attached or changing to .co.uk for me.
https://www.mcinsley.com/testpage
Essentially it only seems to be working on .co.uk links.
Not that I imagine they could be causing a problem but the only other plugins I have installed are Google analytics, Google XML Sitemaps and a social media sharing plugin. Can’t see any reason why these could be causing a problem though.
The only explanation I can offer is that it is caused by FastHosts. The other day I had a truly bizarre issue in which the 404 page was not displaying. It turned out FastHosts server ignored the first 7,889 characters of the file and hence was reading it as blank. The solution was just to stick a load of characters in before the content of 404.php. This is the kind of illogical nonsense I have to deal with when it comes to FastHosts…
Forum: Plugins
In reply to: [Amazon Affiliate Link Localizer] Not working…Right, cleared out some old plugins which could have been getting in the way.
https://www.mcinsley.com/books/
The href on the purple book cover is https://www.amazon.co.uk/dp/ followed by the ASIN.
The text underneath it is the same but with the .com and the orange cover and link below it are set to .co.uk with my own affiliates ID.
I have left yours in for the sake of testing. As you can see the .co.uk links are all overridden with the refferal ID correctly but with the .com nothing is happening.
Forum: Plugins
In reply to: [Amazon Affiliate Link Localizer] Not working…Yeah sorry, I realised it was checking the other countries, I just skimmed over the line of code.
I haven’t got the script online right now. It is possible something else is interfering with it anyway.
Forum: Plugins
In reply to: [Amazon Affiliate Link Localizer] Not working…Tried again today with a fresh download. It is only modifying .co.uk links.
I used a few different proxies from various countries to test a post with a link to every Amazon site. These might just be transparent though and hence wouldn’t change anything. However surely all of the links should have been changed to .co.uk for me when viewing it without any proxies? The only links to be modified with the affiliate bit are .co.uk.
In regards to the ?tag= bit…
https://beckism.com/2008/02/amazon_affiliate_links/As I said, that is a little old, so it might have been changed by now but every single affiliate link I have found is formatted with the ?tag= before it. I am not convinced that simply using /affiliate works.
I was playing with another plugin that used the Google location service and it was unable to find my location too. I think due to my ISP. I suspect this is why the links are not changing. However freegeoip.net works when I visit the site so it should be able to get my location from this. I’ll try stripping out the google location part and just using this to see if I can get it to work. I think Google is returning a null value but the script is not using the fallback for whatever reason.
In regards to the URL format. /dp/ seems to work fine for every site. Personally I would use this as the /exec/ bit has negative connotations and you rarely see it anymore. Doesn’t especially matter but as I said, I am wary of referral links anyway and if I see EXECUTE in the URL where usually I don’t… I might think something suspicious is going on. /dp seems to be what Amazon uses natively now anyway.