Jump to:

1135 Posts in 1984 Topics by 403 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » "Server Error" on unpublish and delete since upgrade to 2.3.5

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1274 Views
  • dbenton
    Avatar
    Community Member
    22 Posts

    "Server Error" on unpublish and delete since upgrade to 2.3.5 Link to this post

    Hello,

    I upgraded a site to 2.3.5 a little over a week ago, and since then I cannot delete or unpublish content. When I try, I get the ajax [...] for a few seconds followed by [ (!) Server Error ]. I have no idea how to debug this one. Any suggestions?

    Thanks,
    David

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: "Server Error" on unpublish and delete since upgrade to 2.3.5 Link to this post

    if you have firebug installed (Firefox plugin) enable it then view the 'Console' tab and scroll down to the failed request. The response of that request should have the actual error message reported by SilverStripe (if you're not in devmode, enable it as well then try again). You could also look up the server logs - which should report the actual error as well.

  • dbenton
    Avatar
    Community Member
    22 Posts

    Re: "Server Error" on unpublish and delete since upgrade to 2.3.5 Link to this post

    Thanks, Willr. I knew there had to be a good way to debug asynchronous requests...

    The issue seems to have to do with the removal of the now deprecated HasManyFileManager. Just to document the issue in case someone else has it, I'll post what I learned below. I think the method in question was added as part of the HasManyFileManager documentation and I forgot to remove it when I upgraded and moved to DataObjectManager.

    ERROR [User Error]: Uncaught Exception: Object->__call(): the method 'deleteattachedfiles' does not exist on 'Page'
    IN POST /admin/EditForm
    Line 576 in /path/to/sapphire/core/Object.php

    Source
    ======
    567:             case isset($config['function']) :
    568:                return $config['function']($this, $arguments);
    569:             
    570:             default :
    571:                throw new Exception (
    572:                   "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config,
    true)
    573:                );
    574:          }
    575:       } else {
    * 576:          throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'");
    577:       }
    578:    }
    579:    
    580:    //
    -----------------------------------------------------------------------------------------------------------------
    581:    
    582:    /**

    <ul></ul>

  • dbenton
    Avatar
    Community Member
    22 Posts

    Re: "Server Error" on unpublish and delete since upgrade to 2.3.5 Link to this post

    Indeed, removing

    public function onBeforeDelete(){
       parent::onBeforeDelete();
       $this->deleteAttachedFiles();
    }

    from my Page class did the trick.

  • ulysses
    Avatar
    Community Member
    57 Posts

    Re: "Server Error" on unpublish and delete since upgrade to 2.3.5 Link to this post

    Keep getting "Server Error" while trying to delete an email address entry in Newsletter Mailing List. The record is not deleted.

    Any idea why. Started all of a sudden. Running an old version 2.3.3

    1274 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.