Pdf feedback plugin install issue and admin page lock down

Pdf feedback plugin install issue and admin page lock down

by Theatre Dots -
Number of replies: 8

Dear all,

I am a novice in Moodle and recently started working on setting up Moodle. I built the first site using default configuration and have uploaded it on a public cloud. I recently did a plugin install for a PDF reader which was 3.2 compatible which i missed out. I am currently using :

Moodle 3.9.2 (Build: 20200914)

After i imported the plugin zip, and tried to install it, the following page appeared. This page is not going away and I am unable to access admin features. Need help on how to get past this page. The moodle is running on Debian OS. Please see the screenshot below. Appreciate if someone in the group can help and guide me here:


Issue

When I click on Continue, it shows below page:



I can see that my version is old but the interface does not provide a way to either roll back or install the new version. If I click on upgrade button, I get below set of errors:


I do not know how to get past this issue. Is there a way to roll back the changes or upgrade to newer version of pdf feedback plugin ? Any help will be of great help

Average of ratings: -
In reply to Theatre Dots

Re: Pdf feedback plugin install issue and admin page lock down

by Ken Task -
Picture of Particularly helpful Moodlers

Is the plugin in question this one?

https://moodle.org/plugins/pluginversions.php?plugin=assignfeedback_pdf

IF so, that shows to be compatible up to version 3.2 of moodle code ... not compatible with 3.9.

The fix is to find the folders/files for the plugin and manually erase/remove them.   Refresh your screen and it should show 'missing from disk'.   Click the upgrade DB to erase the DB references it has in DB for the in-compat plugin.

Best of luck!

'SoS', Ken


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

Re: Pdf feedback plugin install issue and admin page lock down

by Theatre Dots -
Dear Ken

This worked !!! I want to take this opportunity to thank you and express my gratitude for helping me selflessly. You are a true GURU !!
In reply to Theatre Dots

Re: Pdf feedback plugin install issue and admin page lock down

by Ken Task -
Picture of Particularly helpful Moodlers

Dunno about 'guru' ... just have 'been there done that!', but you are welcome.

Lesson to take away for your future admin of a moodle ... always check version compatibility of plugins with version of moodle you are running  before installation attempt.   And 2, make a backup of DB and code for good measure. smile

'SoS', Ken

In reply to Ken Task

Re: Pdf feedback plugin install issue and admin page lock down

by Theatre Dots -
Thanks for your valuable inputs. I am going to bother you again. Post deletion of these folders, when I try and add on "Add Activity" link of any assignment, it gives following error:

Coding error detected, it must be fixed by a programmer: Invalid component used in plugin/component_callback():assignsubmission_pdf

I have cleaned up all the caches - including plugin, developer, themes etc but problem is still persisting. Any suggestions?
In reply to Theatre Dots

Re: Pdf feedback plugin install issue and admin page lock down

by Ken Task -
Picture of Particularly helpful Moodlers

Sounds like install got to your DB ... soooooo ...

Do a backup of your DB first (sql dump) to have something in case suggestions below make situation worse ... precaution.

In mdl_config_plugins table look for any rows related name=assignfeedback_pdf ... drop those rows.

Plugin install.xml of code for plugin shows the following tables may have created.

assignfeedback_pdf_cmnt,assignfeedback_pdf_annot,assignfeedback_pdf_qcklst

drop those tables.

Above is reason why one makes a backup of database prior to installation of any addon. smile

'SoS', Ken



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

Re: Pdf feedback plugin install issue and admin page lock down

by Theatre Dots -
Ken - this worked with one additional step .i.e. after dropping the tables and removing the entries from DB, I had to do the below:

I commented the lines 8032-8034 of the file *lib/moodlelib.php*:

/* if (empty($dir)){
throw new coding_exception('Invalid component used in plugin/component_callback():' . $component);
} */

Only after commenting this line, it eliminated the error. Not sure if this is the right approach but it worked for now. I will recreate the issue on my dev server and will try again.
In reply to Theatre Dots

Re: Pdf feedback plugin install issue and admin page lock down

by Ken Task -
Picture of Particularly helpful Moodlers

Shouldn't have to comment out core code.

3.9 did change the way one selected a resource/activity - one popup screen as opposed to having 2 links ... one resource and one for activity.

Wonder if it's related to that?

In config.php:

// act chooser 0=new 1=old
// $CFG->modchooserdefault=0;

Set yours to '1' for old behavior.   Re-enable those lines in core code you commented out.   Purge caches for good measure.

Then see.

'SoS', Ken