Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MoradHamdy opened this issue Jul 16, 2013 · 6 comments
Open

Comments

@MoradHamdy
Copy link

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

@StanScates
Copy link
Owner

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

@neilcreagh
Copy link

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??

@dglangley
Copy link

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.

@ScottBaxter1
Copy link

Did you manage to get this working...

@dglangley
Copy link

@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.

@ScottBaxter1
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants