Fatal error: in SemanticMediaWiki/includes/SMW_Factbox.php

View: New views
4 Messages — Rating Filter:   Alert me  

Fatal error: in SemanticMediaWiki/includes/SMW_Factbox.php

by Daniel Friesen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Over at Wikia we've been getting issues with SMW. Sometimes on undeletion a blank page (ie: php fatal error) is given making it impossible to undelete a page.
Aug 25 04:04:31 10.8.2.55 httpd[6273]: PHP Fatal error:  Call to a member function getSubject() on a non-object in /usr/wikia/source/releases_200808.3/extensions/3rdparty/SemanticMediaWiki/includes/SMW_Factbox.php on line 326

This appears to be the $this_ns = SMWFactbox::$semdata->getSubject()->getNamespace(); call inside of SMWFactbox::addImportedDefinition.

This would be caused because SMWFactbox::$semdata is not checked to see if it's set before making that call.

Could someone else handle this one? Unfortunately I don't know what that function should output if there is a failure in getting the namespace. Also, there may be an issue with the whole namespace stuff.

FWIW, last page I had issues undeleting was a user talkpage. Annotations should actually be off. Perhaps actual annotating is disabled, but for some reason the factbox is being called, and causing an error because no annotating was done and thus no title is set for it to use.

Oh, btw... I kinda find (SMWFactbox::$semdata === NULL) to be quite ugly. !isset(SMWFactbox::$semdata) works fine, and it's more understandable when you read it.

-- 
~Daniel Friesen(Dantman, Nadir-Seen-Fire) of:
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
--Games-G.P.S. (http://ggps.org)
-And Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Re: Fatal error: in SemanticMediaWiki/includes/SMW_Factbox.php

by Markus Krötzsch-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Montag, 25. August 2008, Daniel Friesen wrote:
> Over at Wikia we've been getting issues with SMW. Sometimes on
> undeletion a blank page (ie: php fatal error) is given making it
> impossible to undelete a page.

SMW 1.3 (release date Sept 7) will fix this (and clean this particular piece
of code); a pity that it affected someone just before that :-(. I will create
a bugfix release SMW 1.2.2 and update SVN as well. Give me some hours for
that.

-- Markus

P.S. Any Wikia-related troubles can be sent directly to Denny and me to ensure
the speedy fixes.


> Aug 25 04:04:31 10.8.2.55 httpd[6273]: PHP Fatal error:  Call to a
> member function getSubject() on a non-object in
> /usr/wikia/source/releases_200808.3/extensions/3rdparty/SemanticMediaWiki/i
>ncludes/SMW_Factbox.php on line 326
>
> This appears to be the |$this_ns =
> SMWFactbox::$semdata->getSubject()->getNamespace(); call inside of
>
> |SMWFactbox::addImportedDefinition.
>
> This would be caused because SMWFactbox::$semdata is not checked to see
> if it's set before making that call.
>
> Could someone else handle this one? Unfortunately I don't know what that
> function should output if there is a failure in getting the namespace.
> Also, there may be an issue with the whole namespace stuff.
>
> FWIW, last page I had issues undeleting was a user talkpage. Annotations
> should actually be off. Perhaps actual annotating is disabled, but for
> some reason the factbox is being called, and causing an error because no
> annotating was done and thus no title is set for it to use.
>
> Oh, btw... I kinda find (SMWFactbox::$semdata === NULL) to be quite
> ugly. !isset(SMWFactbox::$semdata) works fine, and it's more
> understandable when you read it.


--
Markus Krötzsch
Semantic MediaWiki    http://semantic-mediawiki.org
http://korrekt.org    markus@...


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

signature.asc (196 bytes) Download Attachment

Re: Fatal error: in SemanticMediaWiki/includes/SMW_Factbox.php

by Markus Krötzsch-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Dienstag, 26. August 2008, Markus Krötzsch wrote:
> On Montag, 25. August 2008, Daniel Friesen wrote:
> > Over at Wikia we've been getting issues with SMW. Sometimes on
> > undeletion a blank page (ie: php fatal error) is given making it
> > impossible to undelete a page.
>
> SMW 1.3 (release date Sept 7) will fix this (and clean this particular
> piece of code); a pity that it affected someone just before that :-(. I
> will create a bugfix release SMW 1.2.2 and update SVN as well. Give me some
> hours for that.

Okay, done. I could not reprodcue the problem you describe, but it is clear
enough how it should be fixed (I hope I did that in SMW 1.2.2!). I added
further similar checks in other places, since I realise that assuming the
Factbox to be initialised is never safe when you are a hook.

Please let me know if this works for you.

Regards,

Markus


P.S. I sticked to "=== NULL" since I do not like working with isset much. NULL
at least is some value -- it reminds me of proper programming languages ;-).

P.P.S. We should consider refactoring that whole semdata/SMWFactbox
architecture, also to address the problems I started discussing earlier
(subparsers killing SMW data). The current code gets more and more cluttered
with checks that are needed just to make sure that nothing unexpectedly reset
our title or deleted our data. And I fear there are yet more checks one would
need to make it failsafe in all cases.

>
> -- Markus
>
> P.S. Any Wikia-related troubles can be sent directly to Denny and me to
> ensure the speedy fixes.
>
> > Aug 25 04:04:31 10.8.2.55 httpd[6273]: PHP Fatal error:  Call to a
> > member function getSubject() on a non-object in
> > /usr/wikia/source/releases_200808.3/extensions/3rdparty/SemanticMediaWiki
> >/i ncludes/SMW_Factbox.php on line 326
> >
> > This appears to be the |$this_ns =
> > SMWFactbox::$semdata->getSubject()->getNamespace(); call inside of
> >
> > |SMWFactbox::addImportedDefinition.
> >
> > This would be caused because SMWFactbox::$semdata is not checked to see
> > if it's set before making that call.
> >
> > Could someone else handle this one? Unfortunately I don't know what that
> > function should output if there is a failure in getting the namespace.
> > Also, there may be an issue with the whole namespace stuff.
> >
> > FWIW, last page I had issues undeleting was a user talkpage. Annotations
> > should actually be off. Perhaps actual annotating is disabled, but for
> > some reason the factbox is being called, and causing an error because no
> > annotating was done and thus no title is set for it to use.
> >
> > Oh, btw... I kinda find (SMWFactbox::$semdata === NULL) to be quite
> > ugly. !isset(SMWFactbox::$semdata) works fine, and it's more
> > understandable when you read it.


--
Markus Krötzsch
Semantic MediaWiki    http://semantic-mediawiki.org
http://korrekt.org    markus@...


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

signature.asc (196 bytes) Download Attachment

Re: Fatal error: in SemanticMediaWiki/includes/SMW_Factbox.php

by Daniel Friesen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I poked JSharp already (^_^ even before your actual branch), and he opened a ticket... so Wikia should get the patch applied sometime soon.
~Daniel Friesen(Dantman, Nadir-Seen-Fire) of:
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
--Games-G.P.S. (http://ggps.org)
-And Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)
Markus Krötzsch wrote:
On Dienstag, 26. August 2008, Markus Krötzsch wrote:
  
On Montag, 25. August 2008, Daniel Friesen wrote:
    
Over at Wikia we've been getting issues with SMW. Sometimes on
undeletion a blank page (ie: php fatal error) is given making it
impossible to undelete a page.
      
SMW 1.3 (release date Sept 7) will fix this (and clean this particular
piece of code); a pity that it affected someone just before that :-(. I
will create a bugfix release SMW 1.2.2 and update SVN as well. Give me some
hours for that.
    

Okay, done. I could not reprodcue the problem you describe, but it is clear 
enough how it should be fixed (I hope I did that in SMW 1.2.2!). I added 
further similar checks in other places, since I realise that assuming the 
Factbox to be initialised is never safe when you are a hook.

Please let me know if this works for you.

Regards,

Markus


P.S. I sticked to "=== NULL" since I do not like working with isset much. NULL 
at least is some value -- it reminds me of proper programming languages ;-).

P.P.S. We should consider refactoring that whole semdata/SMWFactbox 
architecture, also to address the problems I started discussing earlier 
(subparsers killing SMW data). The current code gets more and more cluttered 
with checks that are needed just to make sure that nothing unexpectedly reset 
our title or deleted our data. And I fear there are yet more checks one would 
need to make it failsafe in all cases.

  
-- Markus

P.S. Any Wikia-related troubles can be sent directly to Denny and me to
ensure the speedy fixes.

    
Aug 25 04:04:31 10.8.2.55 httpd[6273]: PHP Fatal error:  Call to a
member function getSubject() on a non-object in
/usr/wikia/source/releases_200808.3/extensions/3rdparty/SemanticMediaWiki
/i ncludes/SMW_Factbox.php on line 326

This appears to be the |$this_ns =
SMWFactbox::$semdata->getSubject()->getNamespace(); call inside of

|SMWFactbox::addImportedDefinition.

This would be caused because SMWFactbox::$semdata is not checked to see
if it's set before making that call.

Could someone else handle this one? Unfortunately I don't know what that
function should output if there is a failure in getting the namespace.
Also, there may be an issue with the whole namespace stuff.

FWIW, last page I had issues undeleting was a user talkpage. Annotations
should actually be off. Perhaps actual annotating is disabled, but for
some reason the factbox is being called, and causing an error because no
annotating was done and thus no title is set for it to use.

Oh, btw... I kinda find (SMWFactbox::$semdata === NULL) to be quite
ugly. !isset(SMWFactbox::$semdata) works fine, and it's more
understandable when you read it.
      



  

------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@... https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
LightInTheBox - Buy quality products at wholesale price!