Add-on Install & Upgrade

Add-on Install & Upgrade 1.4.3

No permission to download
Chris, when I try to run a "check for updates now" getting this:

Trying to get property of non-object

XenForo_Application::handlePhpError() in AddOnInstaller/Model/AddOn.php at line 291
AddOnInstaller_Model_AddOn->checkForUpdate() in AddOnInstaller/CronEntry/UpdateCheck.php at line 15
AddOnInstaller_CronEntry_UpdateCheck::checkUpdates() in AddOnInstaller/ControllerAdmin/AddOn.php at line 322
AddOnInstaller_ControllerAdmin_AddOn->actionUpdateCheckAll() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/user/public_html/admin.php at line 13
 
Nice work on the latest version. :)

Is it possible to suggest a couple simple features? The first one I'd be interested in is having an option to automatically set the forum to maintenance mode before copying any files and when the cache rebuild is done, automatically turn the forum back to active.

Another thing I'd be interested in is when uploading zip files, an option to disregard the xml file. Maybe it wouldn't be too important for most users, but I'll often have an addon that has just made quick hot fixes with changes to just the php files and doesn't require rebuilding. If enabled, and an xml is present in the zip, it would be a good idea to read the xml and update the version_id and version_string in the xf_addon table in case it changed. With this option available, it might also be possible to use this as a quick way to upload anything to the forum root. Although depending on how you look at it, this could be good or bad. With a bit more tinkering maybe you could even use this addon to upgrade XF core too. :p (heh, probably not, I imagine a bunch of file size too large, timeout, and other random errors)
 
Nice work on the latest version. :)
Thanks :)

Is it possible to suggest a couple simple features? The first one I'd be interested in is having an option to automatically set the forum to maintenance mode before copying any files and when the cache rebuild is done, automatically turn the forum back to active.
Why would you want this?

Another thing I'd be interested in is when uploading zip files, an option to disregard the xml file. Maybe it wouldn't be too important for most users, but I'll often have an addon that has just made quick hot fixes with changes to just the php files and doesn't require rebuilding. If enabled, and an xml is present in the zip, it would be a good idea to read the xml and update the version_id and version_string in the xf_addon table in case it changed. With this option available, it might also be possible to use this as a quick way to upload anything to the forum root. Although depending on how you look at it, this could be good or bad. With a bit more tinkering maybe you could even use this addon to upgrade XF core too. :p (heh, probably not, I imagine a bunch of file size too large, timeout, and other random errors)
I have considered doing something relating to preventing the cache rebuild / not importing the zip. Seems like a logical progression.

With regards to uploading anything to the root, not a massive fan of the idea. I'll consider it though if there's enough demand.

And it's a definite no to upgrading the core :) Don't want to go there! I might even be placing a block on uploading anything to default XF directories in terms of add-ons (why should an add-on ever need to copy stuff to the library/XenForo directory, for example?) but we will see.
 
Why would you want this?
Hmm, now that you actually ask, it made me think. :p It might just be me, but it's kind of a standard thing I do, before installing any addons I would put the board into maintenance and set it back to active when done, just to avoid any potential issues that could happen. This made me remember that I also was going to ask to automatically set the board to maintenance, but that's it, and I would manually set back to active myself. The reason is mostly due to doing a quick check for any obvious bugs or errors. I already do this on a development install of course, but live is always a different story. ;)

Since most people may not need this, it wouldn't make sense to create extra checkboxes that will clutter the view, maybe you could set an xf option for this in the admin settings to perform a specific action when installing/upgrading an addon. For example, by default, do nothing, another option to set maintenance on before installing and off upon completion, and another option to set maintenance on before installing, but would require the admin to turn it back off manually.

I have considered doing something relating to preventing the cache rebuild / not importing the zip. Seems like a logical progression.
Cool, it would be useful indeed. :cool:

And it's a definite no to upgrading the core :) Don't want to go there!
Yea, I just mentioned it for fun, like I said above, I could already imagine a bunch of issues.

I might even be placing a block on uploading anything to default XF directories in terms of add-ons (why should an add-on ever need to copy stuff to the library/XenForo directory, for example?) but we will see.

Funny that you mention this, some addon developers who are not familiar with the framework and how to extend things might end up doing this. For example: http://xenforo.com/community/threads/xf-qaptcha.41043/#post-446188 I suggested for them to change their code, but I'm not sure if they ever did... Well I suppose that is a good thing anyways, if people complain that an addon doesn't work through installing from the addon installer, in this case it will be that they did not code it well. :D
 
I think this add-on is great. However, the irony is, I can't figure out how to install IT correctly.

I unzipped the "upload" file directly into the root of my site using my hosting cpanel. The correct files went to their proper directories. Then I uploaded the xml file to my adminCp and it seemed to install, but when I went to a page, I got a nasty exception error that pretty much rendered my forum useless. I had to manually delete the plugin from my hosting cpanel in order to regain access to my admincp.

Now, the plugin is showing up as an add-on, but of course all of files are not there so I can't use it or delete it.

Can someone please give clear instructions on how to install this.
 
It sounds like you installed it correctly, but I'd really need to know what that "nasty exception error" was to help you debug it.

It should have been logged in Admin CP > Tools > Server Error Log
 
It sounds like you installed it correctly, but I'd really need to know what that "nasty exception error" was to help you debug it.

It should have been logged in Admin CP > Tools > Server Error Log

Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' - library/Zend/Db/Statement/Mysqli.php:77


Stack Trace
#0 /(my site information)/forums/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('????SELECT addo...')
#1 //forums/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '????SELECT addo...')
#2 //forums/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('????SELECT addo...')
#3 //forums/library/XenForo/Model.php(218): Zend_Db_Adapter_Abstract->query('????SELECT addo...', Array, 2)
#4 //forums/library/AddOnInstaller/Model/AddOn.php(280): XenForo_Model->fetchAllKeyed('????SELECT addo...', 'addon_id')
#5 //forums/library/AddOnInstaller/Listener.php(25): AddOnInstaller_Model_AddOn->getAllUpdateChecks()
#6 //forums/library/XenForo/CodeEvent.php(54): AddOnInstaller_Listener::templatePostRender('PAGE_CONTAINER', '<!DOCTYPE html>...', Array, Object(XenForo_Template_Admin))
#7 //forums/library/XenForo/Template/Abstract.php(195): XenForo_CodeEvent::fire(Array, Array)
#8 //forums/library/XenForo/ViewRenderer/HtmlAdmin.php(127): XenForo_Template_Abstract->render('template_post_r...', Array)
#9 //forums/library/XenForo/FrontController.php(565): XenForo_ViewRenderer_HtmlAdmin->renderContainer()
#10 //forums/library/XenForo/FrontController.php(156): XenForo_FrontController->renderView(Object(XenForo_Template_Admin), Array)
#11 //forums/admin.php(13): XenForo_FrontController->run(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
#12 {main}
 
Is this something that I can change....should I change it?
I apologise.

This is a known issue that I have fixed locally but not released here yet. Brogan is absolutely right.

Here's a post that should enable you to fix the problem (it requires a database change in PHP My Admin):

http://xenforo.com/community/threads/add-on-install-upgrade.35211/page-8#post-494810

Once you have made that change, re-upload the files and re-enable the add-on. That should work then.
 
Chris, when I try to run a "check for updates now" getting this:

Trying to get property of non-object

XenForo_Application::handlePhpError() in AddOnInstaller/Model/AddOn.php at line 291
AddOnInstaller_Model_AddOn->checkForUpdate() in AddOnInstaller/CronEntry/UpdateCheck.php at line 15
AddOnInstaller_CronEntry_UpdateCheck::checkUpdates() in AddOnInstaller/ControllerAdmin/AddOn.php at line 322
AddOnInstaller_ControllerAdmin_AddOn->actionUpdateCheckAll() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/user/public_html/admin.php at line 13

Chris, do you know what this error is about? Sorry to bump this up :(
 
Chris, do you know what this error is about? Sorry to bump this up :(
Sorry.

One of the add-ons you have configured for updates apparently doesn't contain a version number.

The only real explanation for this is if you aren't using a Resource Manager URL or the add-on has been deleted...

Can you post a screenshot of the add-ons you have configured for updates?

Also, to help identify the specific add-on you could edit a file and run the check again.

In library/AddOnInstaller/Model/AddOn.php

Search for:
PHP:
$request = $client->request('GET');

Replace with:
PHP:
$request = $client->request('GET');
Zend_Debug::dump($addOn['title']);

When you get the error, there should be a plain text dump of a list of add-on names at the top of the page. The very last one is the one throwing this error.
 
Sorry.

One of the add-ons you have configured for updates apparently doesn't contain a version number.

The only real explanation for this is if you aren't using a Resource Manager URL or the add-on has been deleted...

Can you post a screenshot of the add-ons you have configured for updates?

Also, to help identify the specific add-on you could edit a file and run the check again.

In library/AddOnInstaller/Model/AddOn.php

Search for:
PHP:
$request = $client->request('GET');

Replace with:
PHP:
$request = $client->request('GET');
Zend_Debug::dump($addOn['title']);

When you get the error, there should be a plain text dump of a list of add-on names at the top of the page. The very last one is the one throwing this error.

I've written the links to the resource manager, not external ones or deleted resources.

Here are all the screenshots:

caps1.webpcaps2.webpcaps3.webpcaps4.webpcaps5.webp

This is the output:

string(28) "Add Poll to Existing Threads"

string(24) "Add-on Install & Upgrade"

string(34) "AutoComplete Combo Box by Waindigo"

string(14) "Avatar Gallery"

string(8) "AzuCloud"

string(20) "Conversation Manager"

string(21) "Custom BBCode Manager"

string(13) "Developer Kit"

string(11) "Double Post"

string(28) "Enable Debug From Admin Home"

string(16) "First Click Free"

string(34) "FreddysHouse Tools: Signature Once"

string(12) "Live Updates"

string(25) "Login As User by Waindigo"

string(28) "New User Notification System"

string(23) "No Downtime by Waindigo"

string(24) "Post As User by Waindigo"

string(20) "Prefix Forum Listing"

string(18) "Profile View Count"

string(17) "Quote de XenFacil"

string(23) "Registration Form Timer"

string(34) "Remove Title From Conversation URL"

string(13) "Route Changer"

string(6) "Social"

string(20) "Sub-nodes in columns"
 
Back
Top Bottom