Skip to content

Fatal Error #4

@seppzzz

Description

@seppzzz

SS4.7 : when trying to roll back to an older version i get:

Fatal error
: Maximum execution time of 30 seconds exceeded in
/Applications/MAMP/htdocs/silverstripe_clean/vendor/silverstripe/assets/src/Shortcodes/FileLinkTracking.php
on line 134

also hundreds of entries are written to my Database-Table MyTable_Versions

Its working when changing:
class HistoryGridFieldItemRequest / function doRollback

//$record->doRollbackTo($record->Version);
$record->rollbackSingle($record->Version);

// The live version of the record won't be affected unless you publish you're rolled back record.
$record->publishRecursive();

and i had to include CMSEditLink() to MyClassNameAdmin

public function CMSEditLink()
    {
        $admin = Injector::inst()->get(MyClassNameAdmin::class);

        // Classname needs to be passeed as an action to ModelAdmin
        $classname = str_replace('\\', '-', $this->ClassName);

        return Controller::join_links(
            $admin->Link($classname),
            "EditForm",
            "field",
            $classname,
            "item",
            $this->ID,
            "edit#Root_Main"
        );
    }

seppzzz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions