Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Error #4

Open
seppzzz opened this issue Dec 4, 2022 · 0 comments
Open

Fatal Error #4

seppzzz opened this issue Dec 4, 2022 · 0 comments

Comments

@seppzzz
Copy link

seppzzz commented Dec 4, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant