1053 Posts in 383 Topics by 376 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 977 Views |
-
"Server Error" on unpublish and delete since upgrade to 2.3.5

13 February 2010 at 12:12pm
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 -
Re: "Server Error" on unpublish and delete since upgrade to 2.3.5

13 February 2010 at 12:56pm Last edited: 13 February 2010 12:57pm
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.
-
Re: "Server Error" on unpublish and delete since upgrade to 2.3.5

16 February 2010 at 8:02am
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.phpSource
======
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>
-
Re: "Server Error" on unpublish and delete since upgrade to 2.3.5

16 February 2010 at 8:15am
Indeed, removing
public function onBeforeDelete(){
parent::onBeforeDelete();
$this->deleteAttachedFiles();
}from my Page class did the trick.
| 977 Views | ||
|
Page:
1
|
Go to Top |


