Is there a way to automate all old version plugins to new plugin latest version ? possible ? what it takes ?

Is there a way to automate all old version plugins to new plugin latest version ? possible ? what it takes ?

  • If you have installed Elgg using composer and have added all additional plugins also with composer you would be able to upgrade Elgg and plugins (semi-) automatically by using composer to upgrade. This would only work for Elgg plugins that are available at packagist to allow for them to be installed with composer though.

    If you haven't installed Elgg and any additonal plugin with composer there's no way to automatically upgrade Elgg or plugins. If the plugins you've added (AND any new versions of these plugins) would be available here on the community site, you could use the Elgg Update Services plugin (https://elgg.org/plugins/839678) to check for new versions available (and quickly download if available). But this works only for plugins available here on the community site (sadly some developers are no longer releasing new versions here) and you would still have to upgrade to the new version of the plugin manually on your own.

  • iionly, I am using Elgg 2.3.8. on Nginx+php-fpm have an issue and I don't knowe if it just because there are no updates yet or what and I never noticed this "Manage Updates" before. I just installed plugin Elgg Update Services and entered my email in the settings.  I noticed a new "Manage Updates" in my utilities list. But when I click "Manage Updates" I get a fatal error "Fatal error in exception handler. Check log for Exception at time 1538495885"
     
    the error in the log is:
     
    2018/10/02 11:58:05 [error] 9166#9166: *422402 FastCGI sent in stderr: "PHP message: PHP WARNING: 2018-10-02 11:58:05 (EDT): "Error while sending QUERY packet. PID=5513" in file /home/admin/web/abrahamslight.com/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php (line 104)
    PHP message: Exception at time 1538495885: exception 'DatabaseException' with message 'An exception occurred while executing 'DELETE FROM elgg_private_settings
    WHERE name = 'allowed_languages'
    AND entity_guid = 211':
     
    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
     
    QUERY: DELETE FROM elgg_private_settings
    WHERE name = 'allowed_languages'
    AND entity_guid = 211 
     
    PARAMS: Array
    (
    )
    Stack trace:
    #0 /home/admin/web/abrahamslight.com/public_html/vendor/elgg/elgg/engine/classes/Elgg/Database.php(307): Elgg\Database->executeQuery('DELETE FROM elg...', Object(Doctrine\DBAL\Connection), Array)
    PHP message: Exception at time 1538495885 : fatal error in exception handler : An exception occurred while executing 'SELECT  n_table.*, n.string AS name, v.string AS value FROM elgg_metadata n_table JOIN elgg_entities e ON n_table.entity_guid = e.guid  JOIN elgg_metastrings v ON n_table.value_id = v.id  JOIN elgg_metastrings n ON n_table.name_id = n.id  WHERE  ((1 = 1) AND (n_table.enabled = 'yes')) AND  (e.guid IN (1)) AND  ((1 = 1) AND (n_table.enabled = 'yes')) AND ((1 = 1) AND (e.enabled = 'yes')) ORDER BY n_table.entity_guid, n_table.time_created ASC, n_table.id ASC, n_table.id':
     
    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
     
    QUERY: SELECT  n_table.*, n.string AS name, v.string AS value FRO
    2018/10/02 11:58:05 [error] 9166#9166: *422402 FastCGI sent in stderr: "rahamslight.com/public_html/mod/vroom/classes/VroomPlugin.php(66): session_write_close()
    #5 [internal function]: VroomPlugin->flushToBrowser('shutdown', 'system', NULL)
    PHP message: PHP Fatal error:  Uncaught exception 'DatabaseException' with message 'An exception occurred while executing '
    UPDATE elgg_entities
    SET last_action = ?
    WHERE guid = ?
    ' with params [1538495874, 36]:
     
    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
     
    QUERY: 
    UPDATE elgg_entities
    SET last_action = :last_action
    WHERE guid = :guid
     
     
    PARAMS: Array
    (
        [:last_action] => 1538495874
        [:guid] => 36
    )
    Stack trace:
    #0 /home/admin/web/abrahamslight.com/public_html/vendor/elgg/elgg/engine/classes/Elgg/Database.php(278): Elgg\Database->executeQuery('\n\t\t\tUPDATE elgg...', Object(Doctrine\DBAL\Connection), Array)
    #1 /home/admin/web/abrahamslight.com/public_html/vendor/elgg/elgg/engine/classes/Elgg/Database/EntityTable.php(1437): Elgg\Database->updateData('\n\t\t\tUPDATE elgg...', true, Array)
    #2 /home/admin/web/abrahamslight.com/public_html/vendor/elgg/elgg/en" while reading response header from upstream, client: 64.228.208.81, server: abrahamslight.com, request: "GET /admin/administer_utilities/manageupdate HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "abrahamslight.com", referrer: "https://abrahamslight.com/admin/plugin_settings/elgg_update_services"
  • I'm almost 100% sure that this error is not due to Elgg Update Services (at least not directly... I can only think there might be some conflict with another plugin if Elgg Update Services is involved... but the chances are rather small). One line in the long error message also refers to the Vroom plugin. Not sure either if this plugin is directly responsible or if this part of the error is also only a consequence of the real cause of the problem.

    The error message contains:

    PHP message: Exception at time 1538495885: exception 'DatabaseException' with message 'An exception occurred while executing 'DELETE FROM elgg_private_settings
    WHERE name = 'allowed_languages'
    AND entity_guid = 211':
     
    Now the Elgg Update Services plugin has no allowed_languages setting. I also can't say which plugin would have this setting. Maybe it helps to use the Entity Explorer functionality of Elgg's bundled developers plugin to find out what entity it is that has guid 211.
  • checked that out and id 211 is not named in the developers plugn entity area ..it just says 211 is active

  • Are you using the Language Selector plugin? I found an open issue for this plugin at https://github.com/ColdTrick/language_selector/issues/5. So, it might be that the allowed_languages setting is coming from this plugin and might cause some issues. It also seems there are new version of the Language Selector plugin available at https://github.com/ColdTrick/language_selector/releases that haven't been published here on the community site (which wouldn't be reported by the Elgg Update Services plugin then unfortunately...). If you are using the Language Selector plugin you might want to upgrade to the latest version from the github repo. Maybe it fixes the issue, maybe not (as it's still open). If you would still have the problem, you could at least try to access the "Manage Updates" tab with the Language Selector plugin disabled to see if it makes a differences. If it still makes no difference I'm afraid I can't help you with this issue as I cannot even reproduce it myself.

  • no i haven't been using the language selector but I think i will install it and see if it fixes the issue