Custom Module - Concurrent record locked

I have a couple of custom modules I have written that worked fine in 1.8.5 but now that I am testing them with 1.8.9 (Dockerized) I am getting the error: Concurrent record locked, time out. Exception Type: Xibo\Exception\XiboException has something changed or is now in force that I need to correct for my code? My modules do download data from the web, however instead of using the built-in cache, they store in a cache folder that is within the module’s folder in the custom folder. I am using curl to get those files.

Correction, code is fully functional on my 1.8.7 install as well. So it is something changed in 1.8.8 or 1.8.9 that is causing the issue.

At a guess that’s because of the widget caching changes https://github.com/xibosignage/xibo/issues/1436 (1.8.8), it caused few issues which where then resolved in 1.8.9 https://github.com/xibosignage/xibo/milestone/32?closed=1

I believe we’ve changed the manual page for custom module with the 1.8.8 release as well, please see https://xibo.org.uk/manual/en/advanced_modules.html

Found it! The following code needed to be removed from getResource:

// Update and save widget if we've changed our assignments.
if ($this->hasMediaChanged())
    $this->widget->save(['saveWidgetOptions' => false, 'notify' => false, 'notifyDisplays' => true, 'audit' => false]);
2 Likes