Open deckchan opened 2 months ago
Attach
resources/views/admin/blocks/simple.blade.php
resources/views/admin/pages/form.blade.php
resources/views/admin/repeaters/button.blade.php
resources/views/admin/repeaters/simple_item.blade.php
Hi @deckchan, this issue has been fixed in the latest version of Twill 2. I'd suggest you upgrade twill to 2.13.0.
@zeezo887
I have just tested with 2.13.0, the issue still exists
Twill version: 2.13.0
Laravel version: v9.52.16
PHP version: PHP 8.1.23
Database engine: MySQL 8.0.30
Description
When the entity contains blocks, the blocks with repeaters, the restore revision function will cause many unexpected rows in blocks table. And these rows will keep forever and now my production site contains several thousands rows causing very slow performance.
Steps to reproduce
Create a very simple structure to reproduce: Make a Module eg. Page Page Has Blocks
Save data like this:
Publish.
Database blocks would look like this:
which is good.
And I Edit 3 buttons, change "Button Test 7" -> "Button Test 7 edited" "Button Test 8" -> "Button Test 8 edited" "Button Test 9" -> "Button Test 9 edited"
Update
Database blocks would look like this:
which is also good.
And we do the "restore" action to last revision.
Expected result
Expect result should be no additional rows are added, just normal as previous database screencap.
Actual result
However, unexpected rows are added:
at id (398, 399, 400, 401)
And these rows seem keep forever, and many other rows would produced everytime restore revision.
And these rows should affecting the performance.
Versions
Twill version: 2.11.0 Laravel version: v9.52.16 PHP version: PHP 8.1.23 Database engine: MySQL 8.0.30