Stuck in Plug in Check Update Loop - Higher version already installed

Stuck in Plug in Check Update Loop - Higher version already installed

by Marie Waterhouse -
Number of replies: 16

Went through the auto-update  plugins process and am now stuck on that screen due to error message 'Standard Higher version already installed' . I can not upgrade - go back or do anything am stuck on this page. 

Checked on the original plug in page and it says 'do not download after version 3.2 as its included in Moodle Core. Yup - wish I had known that before hand. 

Please help 

Marie



Import competency framework
/admin/tool/lpimportcsv
2018051400 2016042800
  • Moodle 2016042100
  • tool_lp (2015052416)
Standard Higher version already installed!

Cannot downgrade tool_lpimportcsv from 2018051400 to 2016042800.

More information about this error

× Debug info:
Error code: cannotdowngrade
× Stack trace:
  • line 660 of /lib/upgradelib.php: downgrade_exception thrown
  • line 1857 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 694 of /admin/index.php: call to upgrade_noncore()


Average of ratings: -
In reply to Marie Waterhouse

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Marie Waterhouse -

I found a way out of the Plugin Update Loop of Hell. Posting here - it might help others who get no better suggestions ...or any suggests at all from the forum.
Credit to https://poodll.com/escaping-plugin-dependency-hell/

That page provided a link http://YOUR-MOODLE-URL/admin/tool/installaddon which gets you off the update page.

From here I could navigate to Admin / Plugin 

Find the offending plugin - hope it's not crucial - uninstall it. 

Updates of other Plugin Check Update Loop of Hell should now be ok - update remaining plugins

Wonder how you are supposed to get the uninstalled plugin back.

Realise you now have to do a full site update 

Shudder.


Average of ratings: Useful (2)
In reply to Marie Waterhouse

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Iren Siamo -

Thank you so very much for posting this! Helped me a lot.

I found 2 more solutions to this problem (if we can access the moodle files).

1. download the plugin version that moodle is asking for and replace the plugin directory with the content of this archive. then hit Reload.

OR

2. replace the version name in the version.php file in the plugin folder to the one that moodle is asking for (not really recommended, but sometimes it's needed). Hit Reload.

In reply to Iren Siamo

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
2. Is a bodge. It's not actually fixing whatever you did wrong... it'll come back and bite you one day. Most likely, the next upgrade.
In reply to Howard Miller

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Iren Siamo -

yep, next upgrade should be as in step one or deinstall/reinstall the plugin completely. did that and all is well.

In reply to Iren Siamo

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
...fine as long as you don't care about any data associated with that plugin.
Average of ratings: Useful (1)
In reply to Marie Waterhouse

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

This is really irritating.

I just uploaded a wrong plugin version and now I'm stuck here as well. I don't want to install this version, but there's no abort or cancel button.

Where do I find the wrongly uploaded version? I did not install this version yet, it's just telling me 'Higher version already installed!'

And I know that, so I want to keep the higher version and abort the wrong plugin upload.

Is there a temp-file or something that i can delete?

In reply to Richard van Iwaarden

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Ken Task -
Picture of Particularly helpful Moodlers

What, if anything, is in the following path:
moodledata/temp/core_plugin/code_manager/distfiles

When installing an update via Moodle Admin UI, one should have seen
a screen like:


Did you follow:
https://docs.moodle.org/37/en/Installing_plugins#Installing_directly_from_the_Moodle_plugins_directory

Was your sites correct version shown on the downloads page of moodlee where the 'install now' button is seen?

If you didn't use  the Moodle Admin UI, how did you attempt to install or upgrade the plugin?

What was the plugin?

'SoS', Ken

In reply to Ken Task

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Ken Task -
Picture of Particularly helpful Moodlers

Follow up ... see there is a busted link to an image residing in moodle 3.7 docs in above posting ... so attempting to fix ...

URL:

https://docs.moodle.org/37/en/File:add-on_package_validation.png

URL broken so one can copy and paste in browser .... which works.

docs.moodle.org/37/en/File:add-on_package_validation.png


In reply to Ken Task

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers
Hi Ken! Thank you for trying to help me (once again!)

I'll try to describe where it goes wrong for me quite often. It goes like this:

1. I'm updating Moodle (for example this time from 2.6.2 -> 3.7.1)
2. Moodle updates fine, but afterwards all custom plugins are missing
3. When checking for plugin updates, Moodle starts downloading most of the missing custom plugins - but not all
4. So now the trouble starts. Let's say I have 10 missing custom plugins. Moodle tells me this by giving the 'missing on disk' message in the plugin overview
5. I start downloading these missing plugins. However, I have now found that the big download button on the plugin page often does not download the latest version. For an example, see https://moodle.org/plugins/block_massaction. The download button top right doesn't give you the latest version, but some old version.
6. Then I go to administration->plugins-> install plugins (admin/tool/installaddon/index.php)
7. I upload the zip-package from step 5 and click 'install plugin from the zip file'.
8. From that point on, I'm screwed.

What happens? Moodle has the data in the database from the missing plugin. So it knows what minimal version to expect. But, by wrongly downloading a version from the plugin page, you end up uploading an older version.

Now the search starts... which files to delete to get out of the 'upgrade loop of hell'...

I usually end up deleting the folder in the moodle-directory that corresponds with the plugin. But some users (see above and other posts) don't have access to the Moodle file dir (for a hosted Moodle service f.e.)

There really should be something to break the upgrade loop after point 8 in the above post. A simple 'cancel upgrade' procedure would do...
In reply to Richard van Iwaarden

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers
BTW.... just to make it clear: I fixed this problem myself by deleting the folders that correspond with the plugin, so I'm not in distress or anything about this... it's just very annoying and time consuming.
In reply to Richard van Iwaarden

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Joseph Garza Meyer -

Hello Richard, it's Joseph G. I hope you can give me a hand with the same issue I'd like to believe you also had based on the thread you've got going on. 

I attached a couple of pics hoping you can clarify for me. Must I also delete the folders where this plugin is located in order to move forward? 

Whenever I try to update the Moodle database it just shoots the same error message and loops me back around. Please help. 


Joseph G 

Attachment plug_ins_check_02.PNG
Attachment plug_ins_check_03.PNG
In reply to Richard van Iwaarden

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Ken Task -
Picture of Particularly helpful Moodlers

#2 above ...

"Moodle updates fine, but afterwards all custom plugins are missing"

Indicates you are not using git for updates/upgrades, but what I'll call the old way which required the server operator to copy back into new code directory, all the addons ... like one would do config.php.

If one has many, prone to human error ... unless one maintains a list of those plugins and their locations.

There is no utility for admin to check 'environment' ... for plugins.

Thus, I've turned to CLI and the use of moosh to help.

First, I create an 'addons.txt' file manually that contains one liners of the addons for a site by addon shortname.   Example ... looks like:

mod_hvp
mod_questionnaire
mod_customcert

Then create a bash shell script that will use moosh to check on those addons.  Called 'checkaddons' ... it looks like:

#!/bin/bash
#
echo 'Add-on listing: ';
cat ./addons.txt;
echo '---------------------';
for i in `cat ./addons.txt`
do
   echo "Addon in que: $i";
moosh -n plugin-list |grep $i
done

Executable and executed via ./checkaddons output looks like this:

./checkaddons
Add-on listing:
mod_hvp
mod_questionnaire
mod_customcert
---------------------
Addon in que: mod_hvp
mod_hvp,2.7,2.8,2.9,3.0,3.1,3.2,3.3,3.4,3.5,3.6,3.7,https://moodle.org/plugins/download.php/19594/mod_hvp_moodle37_2019052100.zip
Addon in que: mod_questionnaire
mod_questionnaire,1.9,2.0,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3.0,3.1,3.2,3.3,3.4,3.5,3.6,3.7,https://moodle.org/plugins/download.php/19726/mod_questionnaire_moodle37_2018110101.zip
Addon in que: mod_customcert
mod_customcert,2.9,3.0,3.1,3.4,3.5,3.6,3.7,https://moodle.org/plugins/download.php/19798/mod_customcert_moodle37_2019052001.zip

At this point I can see which plugins do have a version for my destination version on updates or upgrades.

Prior to pulling the trigger on updating/upgrading, I can acquire the plugins (via wget) in advance and put them in a 'addedplugins' directory for manually upgrading.

mkdir addons

cd addons

create a getlist file of urls ... like

https://moodle.org/plugins/download.php/19174/mod_hvp_moodle36_2019031301.zip
https://moodle.org/plugins/download.php/19206/mod_questionnaire_moodle36_2018050109.zip
https://moodle.org/plugins/download.php/18626/mod_customcert_moodle36_2018120301.zip

can then use wget -i ./getlist

and wget will acquire just those zips.

Now that I have them, I can copy the zips to appropriate location of code directory and manually hide the plugin directory ... in /mod of code ... mv mod_hvp .mod_hvp ... apache/moodle can't see them.

And then unzip the zip ... which creates the mod_hvp directory with new code.   Check ownerships/permisisons on the unzipped code directory and set them correctly.

Once having done the above for each addon, can go to admin/cli/ and issue php upgrade.php

No apache is in the loop ... just php and the scripts.   It updates the db tables.

Done!

I'll check site to make sure all is working, then go back and 'clean up' the zips and hidden directories I created to make the backups of code directory cleaner/meaner ... more accurate.  Perfect time to make a backup of code directory.   Might then be done for some time if on LTS of a moodle.

So my overall process is to acquire moodle core code with git and once that. is done and checked then do the plugins.

Yes, takes some time ... but .... works for me! smile

'SoS', Ken



In reply to Ken Task

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers
Yeah, I still hope someone makes something for this that will automate this process. As you know I'm not a CLI fan, nor a programmer. It's just to 80's for my taste smile

I know your way is better, no doubt about it. Probably many people are doing it that way, so that's why I don't understand that someone scripts this or something.

Come to think of it... if you use something like 'Direct Admin' to install Moodle, then you DO have a one-touch-button update. Including all custom plugins.

It can't be that hard to make, right? Well, I wouldn't know... as said: I'm not a programmer.
In reply to Richard van Iwaarden

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Ken Task -
Picture of Particularly helpful Moodlers

No offense, but ...

Despite ones preferences (likes/dislikes) one does what works - even if it means 'turning back the 'clock' to accomplish.

This statement:

"if you use something like 'Direct Admin' to install Moodle, then you DO have a one-touch-button update. Including all custom plugins."

Mind sharing a link to this  'Direct Admin' you mentioned?

Do you mean this: https://www.directadmin.com/

And if what you say is true, why aren't you using it?

'SoS', Ken

In reply to Ken Task

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers
None taken smile

Despite ones preferences (likes/dislikes) one does what works - even if it means 'turning back the 'clock' to accomplish.

I agree. The way I do it also works for me, but like I said before: yours is better.

Mind sharing a link to this  'Direct Admin' you mentioned? Do you mean this: https://www.directadmin.com/ And if what you say is true, why aren't you using it?

That's the one. There are probably more, but that's the one I know that does it. And I am using it. I have several Moodle installations running. But I do not administer servers. Some hosting partners have Direct Admin running for you, and it allows you to install, backup, upgrade and delete a lot of web applications. Including Moodle.

The case spoken of above, with my upgrade loop of hell (not my word btw, read it on this forum somewhere) is running a different server with WHM and cpanel installed on it.

So many diffferent Moodles, many different backup procedures, many different updates... and many different custom modules.

Everything has its own course I guess.

My main focus however is to teach teachers and students how to actually use Moodle. How to make education more exciting. How to use things that work and how to avoid things that don't work. That's what I like to do. Moodle just needs to be like water and electricity for me: it should always work... and preferably I don't need to update it. If I do need to update it, it should be as easy as possible.

Everybody looks at Moodle from different angles. I'm more about 'the using' and less about 'the running' of Moodle...
In reply to Richard van Iwaarden

Re: Stuck in Plug in Check Update Loop - Higher version already installed

by Ken Task -
Picture of Particularly helpful Moodlers

Sounds like DirectAdmin gets core code ... then is programmed to autodownload the plugins? ... didn't know of anything ... Softaculous, Fanstico or whatever that is programmed to intelligently do that ... but what do I know.   Nada ... "nuttin''.

Believe the update/upgrade process (flawless ... intelligent ... core + plugins) may never make it into 'free' moodle.

Reason .... two words ... revenue stream.

Maybe you are attempting to wear too many hats ... and someone who is more a server admin type person should be handling the updates/upgrades.

'SoS', Ken