moodle-format_grid icon indicating copy to clipboard operation
moodle-format_grid copied to clipboard

"Image information is empty"

Open thepurpleblob opened this issue 1 year ago • 12 comments
trafficstars

Moodle 4.1.6 Grid: 2022112607

Getting this on one course...

Image information is empty - Image information is empty - itemid > 539521, filename > Steve.png and sectionid > 539521. Please report error details and the information contained in the php.log file to developer..

More information about this error Debug info: Error code: noimageinformation Stack trace:

line 376 of /course/format/grid/classes/toolbox.php: moodle_exception thrown
line 230 of /course/format/grid/classes/toolbox.php: call to format_grid\toolbox::generate_image()
line 157 of /course/format/grid/classes/toolbox.php: call to format_grid\toolbox->setup_displayed_image()
line 118 of /course/format/grid/classes/output/courseformat/content.php: call to format_grid\toolbox->check_displayed_image()
line 504 of /lib/outputrenderers.php: call to format_grid\output\courseformat\content->export_for_template()
line 108 of /course/format/classes/output/section_renderer.php: call to plugin_renderer_base->render()
line 67 of /course/format/grid/format.php: call to core_courseformat\output\section_renderer->render()
line 284 of /course/view.php: call to require()

It's preventing the course page from displaying at all :(

I've done nothing at all (yet) to investigate this but thought I would raise a ticket in case you have any ideas :)

thepurpleblob avatar Jan 18 '24 15:01 thepurpleblob

Please attach steve.png - the exact file that causes and you know causes the problem.

gjb2048 avatar Jan 18 '24 15:01 gjb2048

Dear @thepurpleblob,

Test file:

null

being:

Screenshot 2024-01-18 213531

that gives:

Screenshot 2024-01-18 214049

with improved reporting: https://github.com/gjbarnard/moodle-format_grid/commit/fa913b1ec3d51e591c67233bfe3fce7ac8753180 - but essentially the same.

Therefore I suspect that the user has uploaded a file that is not a valid image. Patching with the improved error reporting will tell you the user id of the image uploader so that you can take your questioning further with them.

If indeed this is the case, then I would like a demonstration of appreciation for the support I have provided.

Gareth

gjb2048 avatar Jan 18 '24 21:01 gjb2048

Thanks for your enthusiasm here. I kind of assumed pilot error. I'm still waiting to get hold of the actual file from the person reporting the problem.

thepurpleblob avatar Jan 19 '24 09:01 thepurpleblob

Enthusiasm, no, annoyance, yes, as I was considering a release and now this is a spanner in the works.

gjb2048 avatar Jan 19 '24 09:01 gjb2048

I've had no response from our member of staff, so I dug the file out of filedir. Unless I've screwed up (!), Steve.png is, in fact, a PDF document (renamed)...

steve

thepurpleblob avatar Jan 19 '24 09:01 thepurpleblob

Ok, so given this is there the possibility that the user has done this on purpose to annoy you? If so then please tell the 'adult' to grow up, that actions have consequences and would they like to financially compensate me for my time?

gjb2048 avatar Jan 19 '24 09:01 gjb2048

I doubt it... it's unusual for a member of staff, but we frequently have students who think they can convert a document from (say) .docx to .pdf simply by changing the extension. It's a tough world out there!

I have no access to funding; I can only thank you for your time. I must owe you several beers if we are ever in the same place at the same time!

thepurpleblob avatar Jan 19 '24 09:01 thepurpleblob

Dear @thepurpleblob,

Thank you for letting me know and offering beer. Perhaps your employer would consider sponsoring me? I think I may have asked in the past, but am asking again as I'm self employed and all of this support is on my own time.

Gareth

gjb2048 avatar Jan 19 '24 11:01 gjb2048

Dear @thepurpleblob,

The patch https://github.com/gjbarnard/moodle-format_grid/commit/4dbedc15aba9f7da9283746274dcb075a39cfadb now does this:

Screenshot 2024-01-19 164246

So that you'll be able to repair what's been broken on the course more easily. I've also removed the user id (GDPR probably gets annoyed about this in the screen output), so now the files table id can be easily seen and then used by an authorised person to find the record and get the id of the user, track them down and then make enquiries.

G

gjb2048 avatar Jan 19 '24 16:01 gjb2048

Thanks again.

Unfortunately, I can't change my code (reams of paperwork and permission from a committee required). I just deleted it out of the files table. A bit brutal but got the course working again.

thepurpleblob avatar Jan 19 '24 16:01 thepurpleblob

Dear @thepurpleblob,

Oh the paperwork! I'm intending to do a Moodle dot org release soon, so that should bypass the 'committee'.

G

gjb2048 avatar Jan 19 '24 16:01 gjb2048

Dear @thepurpleblob,

I hope you're alright with storm Isha. I've been thinking and perhaps I can send a begging eMail to your boss / people who do have financial authority asking for sponsorship for the support I'm giving. To this end, would it be possible to have some contact details please? Do see https://github.com/gjbarnard/moodle-format_grid/blob/main/Support.md for my eMail / non-public ways of contacting me.

Gareth

gjb2048 avatar Jan 21 '24 19:01 gjb2048

Fixed.

gjb2048 avatar Jun 19 '24 10:06 gjb2048