Discussion Forums  >  Self Hosted Control Panels

Replies: 10    Views: 165

chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
03/08/14 03:08 PM (10 years ago)

Fix for hostgator ...loading issue on plugin downloads (self-hosted)

Found a fix for the self-hosted bug on hostgator (and some other hosts) where trying to download plugins from your buzztouch.com control panel would result in the "...loading" message staying there forever and not actually doing anything. The issue apparently comes in some security setting that's in place by the host. It results in a "403 (forbidden)" error when trying to access one of the .php files on your server. The fix is to change the pluginsUpdate.php file (located in your /admin directory) as follows: Around line 414, you should see the javascript function "installPlugin" declared. Change that function to this one (hopefully this all comes through on the forum post): //installPlugin... function installPlugin(pluginGuid, uniquePluginId, directoryName, downloadURL){ document.forms[0].pluginGuid.value = pluginGuid; document.forms[0].uniquePluginId.value = uniquePluginId; document.forms[0].pluginURL.value = downloadURL; document.forms[0].webDirectoryName.value = directoryName; document.forms[0].command.value = 'installPlugin'; var controlsDiv = document.getElementById("controls_" + pluginGuid); controlsDiv.style.display = "none"; var resDiv = document.getElementById("submit_" + pluginGuid); resDiv.style.color = "red"; resDiv.innerHTML = "...loading"; var theURL = "pluginUpdate_AJAX.php"; var theString = "pluginGuid=" + pluginGuid + "&command=installPlugin&downloadURL=" + downloadURL + "&uniquePluginId=" + uniquePluginId + "&webDirectoryName=" + directoryName; $.ajax({ url: theURL, type: "POST", data: theString, success:function(data){ if(data != ""){ resDiv.innerHTML = data; } } }); }
 
Calypso Kid
Aspiring developer
Profile
Posts: 780
Reg: Mar 09, 2012
Upstate New Yor...
18,200
like
03/08/14 05:40 PM (10 years ago)
Thanks Chris.
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
03/08/14 06:33 PM (10 years ago)
@chris1, Totally awesome! Thanks for fixing this! I put up an updated version of pluginsUpdate.php (with proper spacing) at http://buzztouch.me/?ddownload=394 -Cake
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/09/14 01:17 AM (10 years ago)
Thank you!
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
03/09/14 06:34 AM (10 years ago)
Thanks
 
shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
like
03/09/14 03:44 PM (10 years ago)
thanks Chris, I just switched to hostgator.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
03/09/14 08:02 PM (10 years ago)
Thanks for sharing Chris! Unfortunately no luck for this Hostgator user :((( I applied the changes but I just get the red "...loading" text on the plugin I am trying to update and nothing else happens (same as the previous version). Which is a bugger because this would have saved me some time doing manual updates. Cheers Darrel
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/09/14 08:19 PM (10 years ago)
I noticed this works for downloading plugins from buzztouch but not for updating. Probably a similar thing going on for updates
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
03/09/14 08:22 PM (10 years ago)
Ok thanks ... I must of got a little excited when I saw the "...loading" issue and thought it was for updates too ;)
 
Arubaman
Aspiring developer
Profile
Posts: 636
Reg: Oct 20, 2011
Akron
16,910
like
03/10/14 09:16 PM (10 years ago)
I'll give it a try, thanks.
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
03/26/14 02:54 PM (10 years ago)
Thanks Chris, This is really a lifesaver!!! Much appreciated!! Would be nice to have the plugin update proces fixed too. Best Regards, Danny
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.