Missing from disk

Missing from disk

by Albert Ramsbottom -
Number of replies: 12

Hi


I am just looking at a test moodle upgrade from 1.9.18 > 2.9.4 that another person has done and there are 3 plugins missing from disk

Namely:

News items

Search forums

Time block


How do I get rid of these, just uninstall them?

I feel that at some stage during the march these should have been uninstalled on the way


Albert


Average of ratings: -
In reply to Albert Ramsbottom

Re: Missing from disk

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Normally these reference old plugins that were either removed along the way but still have references in the database or are no longer compatible and so need to be removed.  The problem is that because Moodle does not see them, there is no way to actually uninstall them with manually removing the reference to them in the database.  If the folders are still on the server, you can manually remove them but will still see the error.  The error will not go away until the database reference is removed.

I have a plugin like that but I have never actually bothered to fix the error as it doesn't appear to have a negative effect on the site.

Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Missing from disk

by Albert Ramsbottom -

Yes I guessed that might be the issue, 

so I assume the only way to remove them is define when they became extinct and then uninstall them before the upgrade happens that destroys them

Its a pain as its another browser based intervention, when I intend to use the CLI upgrade as much as possible

1.9.18 >1.9.19 > 2.3.11 >2.7 >2.9 smile

thanks


In reply to Albert Ramsbottom

Re: Missing from disk

by Ken Task -
Picture of Particularly helpful Moodlers

Trick (that might work) ... go directly to via URL the page that has the uninstall button for mods/blocks/etc.

Example: http://site/moodle29/admin/plugins.php

In newer versions of Moodle it warns that it will remove files when un-installing.   In older versions of Moodle it warns you should manually remove the directories related or the next time one run notifiications, Moodle will see the directory and assume it's supposed to install - which will re-create the tables in the DB.   I don't re-call now which versions did what ... but you'll see it and can then act appropriately.

There is also a table that keeps track of the mods/blocks/etc. that are installed.   That's cleaned up via Moodle UI (don't forget that as you march versioning information becomes more important).

On a Moodle march via git ... git will acquire updates to core code ... not addons/plugins, etc..   That's why it's important to stop at steps and check the addons/plugins to see what Moodle would want to update.    This is where your prior research comes into play.    Does a mod/block/theme/etc. have a compatible version for your next step?

As far as leaving them ... no apparent ill affect ... well, that could be true, for now.   But is one leaving a ticking time bomb?   Do we really know that when 4.0 becomes available that bomb won't be triggered?   Always the choice of op ... roll the dice.   But one shouldn't be surprised if it happens.   And, then the quest begins for how to fix. :\

Always best to use the Moodle UI rather than editing the DB directly, but I've had to do that with plugins/addons that weren't programmed correctly to drop the tables.   After having the need to do that on sites that have been ignored for years (by inexperienced server admins) it's the reason I always caution folks about going nuts with addons/plugins.

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Missing from disk

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Unfortunately, if Moodle has the missing from disk notation, you do not get the uninstall option on the plugins page. mixed

In reply to Emma Richardson

Re: Missing from disk

by Albert Ramsbottom -

Definitely  does have the uninstall link, but I haven't clicked on it


smile

In reply to Albert Ramsbottom

Re: Missing from disk

by Ken Task -
Picture of Particularly helpful Moodlers

Well, then ... missing from disk probably means site didn't use it ... whatever it was - addon/plugin or core.   Safe to assume they won't be using in future either?  Dunno ... but, clicking the 'uninstall' link will complain but if it's cleaning up tables and updating the table that tracks what mods/blocks/etc. are present on the system, click it!   Less direct DB work to do then. ;)

**BUT** aren't you gonna run one code base?    Other sites using this one code base might actually use one of those.    Hmmmm ... one of those catch 22's, me thinks.

'spirit of sharing', Ken

In reply to Ken Task

Re: Missing from disk

by Albert Ramsbottom -

We wont be running one code base, we did but as part of this upgrade and migration each school will have their own VM in cloud with a separate code base, moodledata and DB


Cheers

In reply to Albert Ramsbottom

Re: Missing from disk

by Ken Task -
Picture of Particularly helpful Moodlers

Ahhhhh ... change of direction then - which is wise me thinks.

When un-installing then and removing directories, that whatever, will not show in future upgrades along the march.

Before you do, however, would research how many courses might have links to that mod/block, etc..   Even if the mod/block might be broken, a view of all the activities in a Moodle would show a number indicating the number of courses where that resource/mod/block was used.   If you see several, then that might require communication with entity and inquire about it's importance to those using *IF* there was a compat version along the march and especially at destination. 

Have seen Moodles where something wasn't removed correctly, a few courses had links to those mods/blocks, etc. now broken, and all they did was hide the link so students wouldn't get errors.  But, evidently, teachers weren't complaining about it being broken and hadn't really used and didn't plan to use in future.

'spirit of sharing', Ken


In reply to Emma Richardson

Re: Missing from disk

by Ken Task -
Picture of Particularly helpful Moodlers

Ok, I might be losing long term memory here, but thought in older versions that wasn't 'fixed' and one did have an 'un-install' link.   I seem to re-call doing exactly that ... many moons ago! :\

I'd have to re-install every version from 2 to 2.6 to find out/verifiy that so don't think it's worth that.

You could be right. ;)

'spirit of sharing', Ken

In reply to Ken Task

Re: Missing from disk

by Albert Ramsbottom -

Thanks Ken

Yes, I do not want to edit the DB and I am trying to streamline this as much as possible as I have a 1000 of these to do

Got to go now but will respond properly in the morning, and thanks Emma for your assistance as well


Cheers

In reply to Albert Ramsbottom

Re: Missing from disk

by Albert Ramsbottom -

Just clicked on one and it worked but now says that I have to manually delete the folder on the server, which is fine but I was wondering if I delete these folders as a first stage will the link still function at the end stage

Albert



In reply to Albert Ramsbottom

Re: Missing from disk

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Unfortunately not sure - suggest trying one out that way and then reporting back so we all have an answer! 

wink