Last modified: 2011-11-09 02:29:17 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 T31909, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29909 - Modification date default properties are not created for pages in namespaces recently added to SMW
Modification date default properties are not created for pages in namespaces ...
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-15 18:31 UTC by badon
Modified: 2011-11-09 02:29 UTC (History)
1 user (show)

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


Attachments

Description badon 2011-07-15 18:31:17 UTC
When a namespace is added to LocalSettings.php using the parameter $smwgNamespacesWithSemanticLinks, the pages in the newly added namespace will not be updated to have the default property "Modification date". This needs to be corrected to add this property.

The only solution I know of is to manually click "Edit" on each page, and then click "Save". That will work even if nothing is changed. If nothing is changed, then the correct modification date will be shown even if it is a date from before the namespace was added.

Since the manual solution to this is so simple, I think it will be straightforward to automatically fix this problem using the maintenance script in Special:SMWAdmin simply by making it repeat the manual solution above in an automatic fashion for all EXISTING pages in the newly added namespace that do not have a modification date property.

Since SMW has a bug with deleted pages (https://bugzilla.wikimedia.org/show_bug.cgi?id=29892), it is important to make sure that the pages really exist before doing this procedure.
Comment 1 badon 2011-07-15 18:37:13 UTC
A quick way to test this bug and play with it is with this in LocalSettings.php

$smwgNamespacesWithSemanticLinks = array(
	NS_MAIN 		=> true,
	NS_TALK 		=> false,
	NS_USER 		=> true,
	NS_USER_TALK 		=> false,
	NS_PROJECT 		=> true,
	NS_PROJECT_TALK 	=> false,
	NS_MEDIAWIKI 		=> true,
	NS_MEDIAWIKI_TALK 	=> false,
	NS_TEMPLATE 		=> true,
	NS_TEMPLATE_TALK 	=> false,
	NS_HELP 		=> true,
	NS_HELP_TALK 		=> false,
	NS_CATEGORY 		=> true,
	NS_CATEGORY_TALK 	=> false,
	SMW_NS_PROPERTY		=> true,
	SMW_NS_PROPERTY_TALK 	=> false,
	SMW_NS_TYPE 		=> true,
	SMW_NS_TYPE_TALK 	=> false,
	SMW_NS_CONCEPT 		=> true,
	SMW_NS_CONCEPT_TALK 	=> false,
	SF_NS_FORM 		=> true,
	SF_NS_FORM_TALK		=> false,
);

And then use this on a wiki page to display one of the newly added namespaces ("Mediawiki" in this example):

{{#ask: [[:Mediawiki:+]] | ?Modification date | mainlabel=Mediawiki namespace [[Special:AllPages]] | limit=500}}
Comment 2 Jeroen De Dauw 2011-11-09 02:29:17 UTC
This makes sense since this data gets saved on save, so it won't magically
appear on all pages when enabling it. If you want it to show up everywhere
immediately, then you can run the data update/refresh thing on SMWAdmin and
then run maintenance/runJobs.php. If you can't do the later, at least the data
will be set eventually (depending on your wikis size and jobQueue settings)
without having to do more manual work.

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


Navigation
Links