Last modified: 2012-08-21 10:09:16 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 T32717, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30717 - <nowiki> in property throws fatal error
<nowiki> in property throws fatal error
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized major (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-03 00:51 UTC by DaSch
Modified: 2012-08-21 10:09 UTC (History)
3 users (show)

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


Attachments
stack trace when running runJobs.php (6.99 KB, text/plain)
2012-08-21 08:38 UTC, Nischay Nahata
Details

Description DaSch 2011-09-03 00:51:37 UTC
When using something like this
[[Link::<nowiki></nowiki>]]
This error occurres

Fatal error: Call to a member function getScheme() on a non-object in /.../httpdocs/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_URI.php on line 248
Comment 1 Jeroen De Dauw 2011-09-03 18:10:13 UTC
What version of MediaWiki and extensions? I cannot reproduce this issue locally.
Comment 2 DaSch 2011-09-03 18:59:50 UTC
I've latest from SVN
The point is that the property Link needs to have type URL
http://www.wecowi.de/wiki/Attribut:Link
Comment 3 DaSch 2011-10-23 21:42:23 UTC
Still something like this
[[Link::<nowiki>de.wikipedia.org</nowiki>/wiki/Bochum-Gelsenkirchener_Straßenbahnen|Bogestra bei Wikipedia]]
leads to a fatal error like described above
still latest trunk version

The property Link has type URL
Comment 4 Markus Krötzsch 2012-02-11 18:11:25 UTC
Fixed in r111250. As usual, nowiki, math, etc. do not work in SMW values since their content is replaced by MediaWiki only later (so SMW does not know what was written there). It is now ensured that even in this case, the value object is initialised properly, so that errors like the above are prevented.
Comment 5 Nischay Nahata 2012-07-12 10:50:22 UTC
I still see this error when importing a wiki.

Fatal error: Call to a member function getScheme() on a non-object in C:\wamp\ww
w\Store3\extensions\SemanticMediaWiki\includes\datavalues\SMW_DV_URI.php on line
 255

Here's the stack trace.
http://dpaste.org/WQJ2j/
Comment 6 Nischay Nahata 2012-08-21 08:38:23 UTC
Created attachment 10989 [details]
stack trace when running runJobs.php
Comment 7 Markus Krötzsch 2012-08-21 09:39:08 UTC
This is actually another problem that is not related to nowiki at all. The value that is loaded from the database has the wrong DI type, so the loading fails. See loadDataItem() on line 169 in DV_URI. This probably indicates that some stored data was not readable (caused an exception when trying to load it into a DI). This is okay in general (though I don't know if it is ok in this particular case, but this is another issue). The main issue here is that DV_URI does not correctly deal with this situation and fails to check the validity of the loaded data in some cases. Similar issues exist in other DV implementations.

A more robust system is needed. Instead of accessing m_dataitem directly, one should always use a local function getInternalDataItem() that creates a fallback dataitem as a result if there is none. I will fix this ...
Comment 8 Markus Krötzsch 2012-08-21 10:09:16 UTC
Ok, should be fixed (for URIs) in https://gerrit.wikimedia.org/r/#/c/20871/

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


Navigation
Links