StanScates/Tweet.js-Mod

The Widget working on a localhost, but not working on webhost !!

Opened this issue · 6 comments

Hi

I found a strange issue, when i check the live preview on my localhost, i found it's working fine. But when upload to my webhost, i found that the widget stop working and some other plugin also stop working, and if i deleted the index.php file, the other widgets back to work again.

I thought that may be there is an update to the plugin, and i found it's up to date although if it's working on my localhost, it should also work on webhost .Here is live preview http://http://moradxd.zxq.net/except/4/

Any idea for that ?

Regards

Check your modpath or that the index.php file exists in the right place, the widget is trying to request http://moradxd.zxq.net/except/4/js/twitter/index.php, which is evidently does not exist

I'm having a similar issue, where it will work on some hosting but not on others:
It won't work here (where I need it to work) http://www.furmston.co.uk/twitter/ but the exact same folder uploaded to here works http://acuman.co.uk/twitter/

Any ideas??

I had the same problem and found that the inclusion of the tmhUtilities.php was causing an error because it needed to be included locally but my webhost somehow already has it included and the duplication was causing a fatal error. Around line 140-142 of the twitter/index.php file, you'll see the following lines:

private function getTwitterJSON() {
    require $this->lib.'tmhOAuth.php';
    require $this->lib.'tmhUtilities.php';

Try commenting the last line (142, "require $this->lib.'tmhUtilities.php';"). Worked on the webhost for me, whereas obviously you may still need this line for local development.

Did you manage to get this working...

@ScottBaxter1 Yes, my solution worked above, but it's tricky because if you're pushing from a local repository that has one setting (where tmhUtilities.php is already included somewhere else) to a remote repository that has a contrary setting (where tmhUtilities.php is NOT already included), then you'll have to address that inconsistency somehow. You may address this by checking for the HTTP_HOST or something like that.

Thanks for the reply @dglangley think my issue is something else... in the console it keep mentioning cross domain... funny thing is it isn't changing domain all files are on 1 domain.