Database destroyed in H5P content element „Portfolio" due to title page

LMS: WordPress 6.8.2

H5P-Plugin: Version 1.16.0 | Von Joubel

Browser: Chrome

Desktop

We use the portfolio content element for learning module production and the title page as the start page of the learning module, specifying the length of the learning module, an image, and an introductory text. 

For about two months now, the database of our WordPress instance has been crashing repeatedly. H5P generates a lot of code, so that the size of the learning module suddenly increases from 300 KB to 19 MB and the database consequently crashes due to the high data volume. Most of the code generated by H5P seems to be generated by the title page. If the title page is deleted by opening the file in LUMI, the code is also cleaned up and the file can be imported back into WordPress. Cleaning up the database and removing the code by our in-house IT experts also allows the H5P element to be called up again, but the problem reappears after editing the H5P element, even if nothing is changed on the title page. 

What could be the cause? I've attached a file which caused a problem yesterday. Now the code is fixed by our IT-expert.

Thanks 
Meggi

Summary: 
Portfolio database
Content types: 
otacke's picture

Hi!

It's possible that there's a bug in the editor widget, but I could not reproduce anything similar by editing and saving your content a couple of times. Given that Lumi uses the same libraries apparently, Lumi should not give you different output then WordPress (unless it's something happening in the H5P integration, so the plugin, not the content type).

There was also once a case of growing content due to some issue with the CKEditor caused by some pasted HTML content that was constantly reencoded with every edit, but I can't find it here on the forum for reference.

It would help to isolate the cause if you shared what the database entry looks like if faulty (most likely the "parameters" column in the "wp_h5p_contents table").

Best,
Oliver

Inhalt der Spalte Parameter (Die Farbanpassung wiederholt sich unzählige Male, so dass das H5P JSON-Objekt mehr als 50 MB groß wird).

{"showCoverPage":true,"bookCover":{"coverDescription":"<p style=\"text-align:center;\"> <\/p><p style=\"text-align:center;\"><span style=\"font-size:0.875em;\">Dieses Lernmodul besch\u00e4ftigt sich mit dem Einsatz von Open Educational Resources (OER) im inklusiven Unterricht.<\/span><\/p><p style=\"text-align:center;\"> <\/p><p style=\"text-align:center;\"><span style=\"font-size:0.875em;\">Sie k\u00f6nnen das Lernmodul jederzeit unterbrechen. Wenn Sie das Lernmodul das n\u00e4chste Mal mit demselben Browser\/System aufrufen, beginnt es wieder an der Stelle, an der es beendet wurde.<\/span><\/p><p style=\"text-align:center;\"> <\/p><p style=\"text-align:center;\"><span style=\"font-size:0.875em;\">Dieses Lernmodul wurde im Sinne von OER vom Zentrum f\u00fcr Lehrer*innenbildung in Zusammenarbeit mit <\/span><span style=\"font-size:0.875em;color:rgb(60,67,74);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);background-color:rgb(255,255,255);

[...]

background-color:rgb(255,255,255);\">Studierenden des Seminars \"Inklusive Bildung mit OER\" an der Universit\u00e4t zu K\u00f6ln im Sommersemester 2025 <\/span><span style=\"font-size:0.875em;\">erstellt und darf unter Beachtung der Lizenzbedingungen mit Nennung unseres Namens verwendet werden. Das Lernmodul ist unter der Lizenz CC BY-SA 4.0 nutzbar.<\/span>

 

<strong>Bearbeitungszeit: 45 Minuten<\/strong><\/p>","showHeader":false,"showFooter":false,\

 

 

 

 

 

 

 

 

 
otacke's picture

That looks very much like the CKEditor/text pasting issue that I mentioned. The parameter value "coverDescription" that grows and grows stems from the CKEditor that H5P's core uses for HTML text fields. This is not a bug in the Portfolio content type.

I now found the reference that I mentioned before: https://h5p.org/node/1512892. It mentions the same symptoms and points towards the CKEditor in H5P core that does not properly handle inline CSS that gets put into the HTML field when pasting from another source such as a Word document. So, to prevent the issue, you should avoid creating your cover text elsewhere and pasting it to H5P in general - until H5P Group investigates and fixes this.

@BV: Could you please create a ticket and link this post and the one I mentioned above?

 

BV52's picture

Hi Oliver,

Thank you for investigating this. I have created the the ticket: https://h5ptechnology.atlassian.net/browse/HFP-4297

-BV

otacke's picture

Excellent, thanks!

Hello,

the Code is attached in the word-File.

Thanks
Meggi

Attachments: 

Hello, thanks a lot. I will do that. Greetings Meggi