Error when deleting a comment
With Vanilla 2.1 and OpenGraph enabled, I get an error if I create a comment and immediately delete it (without refreshing the discussion).
Comment is indeed deleted but I can only see that if I reload the page
0
With Vanilla 2.1 and OpenGraph enabled, I get an error if I create a comment and immediately delete it (without refreshing the discussion).
Comment is indeed deleted but I can only see that if I reload the page
Comments
I've noted the same issue. Anyone have any ideas?
The usage of
$Sender->Discussion->Bodycauses the error. So you have to do 2 modifications to the plugin in order to get it going.First search for this:
// og:type if(strlen($Sender->Discussion->Body) < 1){and replace with that
// og:type if (isset($Sender->Discussion)) { $Description = $Sender->Discussion->Body; } else { $Description = $Sender->DiscussionModel->EventArguments['Discussion']->Body; } if(strlen($Description) < 1){And second, replace this:
$DefaultDescription= C('Plugins.OpenGraph.DefaultDescription'); $Description = $Sender->Discussion->Body; if(strlen($Description) > 0 || strlen($DefaultDescription) > 0){with that
$DefaultDescription= C('Plugins.OpenGraph.DefaultDescription'); if(strlen($Description) > 0 || strlen($DefaultDescription) > 0){@R_J - that did the trick!
Many thanks, you're a superstar