Last modified: 2013-04-09 12:06:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48849, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46849 - Error: getNsText() and SF_Utils.php
Error: getNsText() and SF_Utils.php
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
REL1_20-branch
All All
: Unprioritized normal (vote)
: ---
Assigned To: Yaron Koren
http://kubb.kubbwiki.de/index.php?tit...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-03 14:46 UTC by presse
Modified: 2013-04-09 12:06 UTC (History)
1 user (show)

See Also:
Web browser: Google Chrome
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description presse 2013-04-03 14:46:29 UTC
I have change from mw 1.90.4 to 2.20.3. 
Semantic Forms Vers. 2.5.2
http://kubb.kubbwiki.de/index.php/Spezial:Version


Now i get the Fatal error: Call to a member function getNsText() on a non-object in / ... /extensions/SemanticForms/includes/SF_Utils.php on line 43 

when i open a article with Formular or wil create it. 

All article are into Namespace (Main) 

I see no Error into SF_Utils.php Line 43

[code]
42                public static function titleString( $title ) {
43		$namespace = $title->getNsText();
44		if ( $namespace !== '' ) {
45			$namespace .= ':';
46 		}

[/Code]

Its's a bug? 

cu
Bastor
Comment 1 Yaron Koren 2013-04-03 14:58:01 UTC
Hi Bastor,

By any chance, do you have either of the following set in LocalSettings.php?

$sfgUseFormEditPage = true;
$sfgCacheFormDefinitions = true;
Comment 2 presse 2013-04-03 20:47:24 UTC
i have now check all combination of 

$sfgUseFormEditPage = true;
$sfgCacheFormDefinitions = true;

same error :-(
Comment 3 Yaron Koren 2013-04-03 21:29:24 UTC
Hi - actually, I thought one of those two might be *causing* the problem, but in any case, that answers the question.

I have another question: what is the form that is meant to edit this page? And where is the connection between this page and that form defined? I don't see a connection defined in either the page's categories, or its namespace.
Comment 4 presse 2013-04-04 10:58:48 UTC
Hi,
under 1.9 (www.kubbwiki.de) its running 
under 2.2 (kubb.kubbwiki.de)its have the Problem.
No change in my Code/way, Hardware, Setup same in both Versions.
??? very mystic for me :)


shortinfo as example:
#####################
Articel about teams, create over  
--------------------------------

[[Form:NewTeam| Neues Team eintragen]]|

#################
Form:  Formular:NewTeam
-----------------
...
{{#forminput:form=NewTeam}}
...
{{{for template|Infobox_Team2}}}
{| class="formtable"
...

#################
Template:  Vorlage:Infobox Team2
-----------------
...
[[Kategorie:NewTeam]]
...

################
Articel: BerlinCS
-----------------
{{Infobox_Team2
|Teamname=BerlinCS
...
}}

################
Category: NewTeam
-----------------
This category uses the form [[Hat Standardformular::NewTeam]].
Comment 5 Yaron Koren 2013-04-04 13:16:46 UTC
By "1.9" and "2.2" I assume you mean 1.19 and 1.20.

Anyway, I got confused about the category-to-form relationships because I only looked at the page for "Attribut:Has default form", not for "Attribut:Hat Standarformular", and your wiki has both. And actually, now I think that might be causing this problem. But I'm not sure. Could you help with the debugging? The function that crashes, SFUtils::titleString(), is called in two different places, line 399 of /includes/SF_Utils.php and line 194 of /includes/SF_FormEditAction.php, and I don't know which is the call that's happening here. Could you put in a little print statement above both calls, and let me know which one is causing the crash?
Comment 6 presse 2013-04-06 12:57:07 UTC
I have send you a mail, but now i see differnz

under /SF_Utils.php          i get wrong two pagename  of other page
under /SF_FormEditAction.php i get right form and right pagename

i think a table is defect, but i have no idea, what table its wrong.
Comment 7 presse 2013-04-06 16:58:19 UTC
Database manual new import same error :-(
Comment 8 Yaron Koren 2013-04-07 02:05:12 UTC
Hi, okay - now we're getting somewhere; the issue is coming when it tries to get "values from category". Could you clarify what you mean by "i get wrong two pagename  of other page", though? Do you happen to know what the values are for $row['page_namespace'] and $row['page_title'] right before it crashes?
Comment 9 presse 2013-04-07 11:14:29 UTC
http://kubb.kubbwiki.de/index.php?title=Alfa-kubbarna&action=formedit
SF_Utils
$row['page_namespace'];  =0
$row['page_title']; =Puesselbueren
$cur_title ;        =Puesselbueren
$cur_value ;        =Puesselbueren
Comment 10 Yaron Koren 2013-04-07 12:26:14 UTC
Hi - are you sure those are the values right before it crashes? If titleString() had crashed, $cur_value shouldn't even be getting set.
Comment 11 presse 2013-04-07 13:02:32 UTC
Thats the data, i have send you login data, you can check it directly .
Comment 12 Yaron Koren 2013-04-07 13:31:47 UTC
I haven't actually gotten any emails from you - what address are you sending them to?
Comment 13 presse 2013-04-07 14:39:56 UTC
yaron57@gmail.com
Comment 14 Yaron Koren 2013-04-07 14:42:54 UTC
Ah. Well, that's my main email address, but I'm not getting the emails; I don't see them in my spam folder either.
Comment 15 presse 2013-04-07 14:53:43 UTC
Oh, look now please
Comment 16 Yaron Koren 2013-04-07 14:59:44 UTC
Okay, this time I got it!
Comment 17 Yaron Koren 2013-04-08 00:25:15 UTC
Hi - after some testing, I think I know the cause of the error: the categories "Allespieler" and "Spieler" are subcategories of one another, which gets the SF code into an infinite loop when it goes to get all the pages in the category, for autocompletion. Why that leads to this specific error message, I don't know, but if you fix that problem, the error should go away.
Comment 18 Yaron Koren 2013-04-08 19:12:17 UTC
I'm marking this as "invalid" (no offense intended). Feel free to re-open if there's still an issue.
Comment 19 Yaron Koren 2013-04-09 12:06:26 UTC
This actually turned out to be caused not by the category loop, but by a "phantom page", that belonged to a namespace that no longer exists. I fixed handling for this in the code, so I'm marking it as "fixed".

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links