Extension talk:Semantic Extra Special Properties
Add topic| This page used the LiquidThreads extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Changes to your code
[edit]Heiya Rotsee, I just made some formatting changes to your code to make compliant with MediaWiki customs. I hope that is ok with you. Cheers [[kgh]] 22:32, 4 January 2012 (UTC)
- Of course, thank you! I'm still learning. Thanks for your time! rotsee 07:02, 5 January 2012 (UTC)
- PS. Nice with German translation, too! rotsee 07:05, 5 January 2012 (UTC)
- Whilst I was at it, I thought I would be nice too. :) Actually I am not a coder, so I did not interfere with the extensions code as such. Thank you for your work! Cheers [[kgh]] 13:11, 5 January 2012 (UTC)
- PS. Nice with German translation, too! rotsee 07:05, 5 January 2012 (UTC)
Convert to patch for SMW?
[edit]Could this extension be converted into a patch for SMW, so it can be merged in and available to all SMW users? Badon 05:35, 19 January 2012 (UTC)
- It would be more flexible to have it in an extra extension as it is now. Additionally I doubt that all extra properties would make it into core. [[kgh]] 09:59, 19 January 2012 (UTC)
- Is there a reason why they wouldn't make it into the core? Is it just to make maintenance easier? It seems that making them optional is a good idea, in any case. Badon 01:07, 20 January 2012 (UTC)
- It is just a feeling. [[kgh]] 10:19, 20 January 2012 (UTC)
- I guess the problem is that you can imagine an infinite number of special properties, so it might make sense to be a bit conservative about which ones to include in core. These ones do not reflect the wishes from the community, but only my personal needs. rotsee 13:23, 22 January 2012 (UTC)
- I suppose at some point we should find out what people want. I have been keeping a list here:
- User:Badon/Extension:Semantic_MediaWiki/Manual#Needed_special_properties
- But I haven't done anything about finding a broad consensus, even though many of those I have gathered from people's wish lists. Badon 04:48, 23 January 2012 (UTC)
- People are willing to help ones they see you are part of the community, unfortunately User:Badon, the only contribution I have seen from you so far (mailinglist, bugzilla etc.) are either complains or long list of do-to's but what instead using this time spent in creating something meaningful for the SMW community by starting to contribute.
- Like myself, I'm not a programmer but when I started to look at what people like Jeroen or Yaron had done, you easily can get the beat and start to make small contributions.
- Instead of creating long lists with wishes for others to implement why not take a moment, look the code yourself and try to contribute.
- In regards to SemanticExtraSpecialProperties, rotsee showed how it could be done it is straight forward and can easily be used as template. MWJames 15:56, 2 February 2012 (UTC)
- I strongly disagree with you, and I am offended. I do testing, bug reports, develop new applications for existing code, answer user questions (on several different mailing lists, forums, IRC, etc), write documentation, aggregate requested enhancements, participate in enhancement design, and more, in addition to my contributions to other WikiMedia Foundation projects. I also contribute to other charities that are not part of the WikiMedia Foundation, which you are probably not aware of.
- Although I would like to contribute code to WikiMedia Foundation projects, I have limited time, and I am already contributing nearly all of my available time and money to WikiMedia Foundation, and other charitable organizations. In addition, I am not a programmer. I have the ability to become one, but it's going to take a while. It took me about a year of focused dedication just to learn the basics of MediaWiki, bug testing, etc., well enough to contribute what I am contributing now.
- For you to tell me my contributions are not meaningful is disrespectful, and offensive. I hope you don't drive other volunteers out of the WikiMedia Foundation that way. Don't worry about me, though. You are not the first one to do that to me, and I have a short memory about such things, so I'll probably forget about it by tomorrow.
- Did you know that I helped organize English Wikipedia's SOPA/PIPA protest? I feel like I need to put together a sort of WMF resume of credentials to deflect random, pointless criticism. I feel like I need to watch out for others who might be attacked by the same kind of thing. Some talented programmers have arrogant disdain for anyone who's not a programmer, or who is less talented than they are.
- I contribute to the charities I'm interested in an anonymous, or pseudonymous fashion. You will never know the true extent of my contributions, and that's how I like it. I get to see people's true colors when they think I'm nobody. Just because you think you've been contributing longer than I have, and/or in a different way than I have, does not make you better than me, and certainly does not give you a license to insult me or demean my contributions.
- Don't do that to anyone else, either. I'll forget about this by tomorrow, but I will still be paying attention.
- By the way, did I report a bug against some of your code? I've noticed some people get upset for some reason when that happens. I call it "shooting the messenger". If that's what has provoked you to insult me here, I apologize. I do mean well when I test for, and report bugs. I'm not trying to upset you. Badon 19:55, 2 February 2012 (UTC)
- I guess the problem is that you can imagine an infinite number of special properties, so it might make sense to be a bit conservative about which ones to include in core. These ones do not reflect the wishes from the community, but only my personal needs. rotsee 13:23, 22 January 2012 (UTC)
- It is just a feeling. [[kgh]] 10:19, 20 January 2012 (UTC)
- Is there a reason why they wouldn't make it into the core? Is it just to make maintenance easier? It seems that making them optional is a good idea, in any case. Badon 01:07, 20 January 2012 (UTC)
Add code for mimetype and mediatypes and some other changes ...
[edit]I would like to propose some minor changes as it would make it easier for other people to contribute:
- Contribution: could you put the code at least on github it would it make more simpler to patch and create release branches
- Maintenance: could you set an own class such as SemanticExtraSpecialProperties.hooks.php so it would make adding code a bit more easier and it would be a cleaner implementation
- Customizing: $smwgPageSpecialProperties2 seems to be an ought name (I mean the 2 at the end) so why not just called $sespSpecialProperties as it just belongs to SemanticExtraSpecialProperties
Since we needed something similar for mimetype and mediatypes on NS_FILE objects, as soon as you have it on github I'll at the code for mimetype and mediatypes.
Cheers and thanks MWJames 15:30, 2 February 2012 (UTC)
- I just put this at Github (hope I made everything correct): https://github.com/rotsee/Semantic-Extra-Special-Properties
- As for the other suggestions (thanks for pointing those things out, btw), I'll take them on next week, as I will now be afk a couple of days!
- rotsee 19:02, 2 February 2012 (UTC)
- Thanks. Hope you don't mind but I made a fork https://github.com/mwjames/Semantic-Extra-Special-Properties and included all the proposed changes.
- Feel free to make a review and if you'd like I can put them into your master later on.
- Cheers MWJames 20:30, 2 February 2012 (UTC)
- Sweet, can you put them in my master as well when you have time? rotsee 18:46, 8 February 2012 (UTC)
- Just pushed it into your master. I left $smwgPageSpecialProperties2 for compat reason but changed to docu to use $sespSpecialProperties instead.
- Cheers MWJames 05:23, 9 February 2012 (UTC)
- Sweet, can you put them in my master as well when you have time? rotsee 18:46, 8 February 2012 (UTC)
- According to kgh he noted that hidden to some usergroup, as the article author property will list all authors for everyone maybe this should be taken care otherwise the extension faces scrutiny by a warning. MWJames 21:19, 2 February 2012 (UTC)
- I just reformatted an existing warning. :) Cheers [[kgh]] 21:23, 2 February 2012 (UTC)
Problems with v0.2.3
[edit]Exception
[edit]Sometimes I have an exception in PHP code:
$firstRevision = $title->getFirstRevision(); $firstAuthor = User::newFromId( $firstRevision->getRawUser () );
I added debug statements and found a cause: Some artificial pages does not have first revision, so $firstRevision is null, and calling getRawUser method on null gets the code into trouble.
I fond the reason: Some fake pages does not have any revisions. Fake pages appears when an extension like SemanticMaps play tricks with parser to get template expanded or something like this.
Adding additional check
if ( $firstRevision !== null )
helps to avoid the problem.
- That should be added then, thanks for debugging! rotsee (talk) 19:43, 27 March 2012 (UTC)
One way ticket?
[edit]When I have discovered the crash, my first desire was to disable extension. However, after disabling I had another trouble: I cannot view properties any more:
There is no predefined property with "___CUSER".
Backtrace:
- 0 /var/www/oc.su/Extensions/SemanticMediaWiki-1.7.1/includes/storage/SMW_SqlStubSemanticData.php(182): SMWDIProperty->__construct('___CUSER', false)
- 1 /var/www/oc.su/Extensions/SemanticMediaWiki-1.7.1/includes/storage/SMW_SqlStubSemanticData.php(164): SMWSqlStubSemanticData->unstubProperty('___CUSER')
- 2 /var/www/oc.su/Extensions/SemanticMediaWiki-1.7.1/includes/storage/SMW_SqlStubSemanticData.php(69): SMWSqlStubSemanticData->unstubProperties()
- 3 /var/www/oc.su/Extensions/SemanticMediaWiki-1.7.1/specials/SearchTriple/SMW_SpecialBrowse.php(155): SMWSqlStubSemanticData->getProperties()
- 4 /var/www/oc.su/Extensions/SemanticMediaWiki-1.7.1/specials/SearchTriple/SMW_SpecialBrowse.php(108): SMWSpecialBrowse->displayData(Object(SMWSqlStubSemanticData), true)
- 5 /var/www/oc.su/Extensions/SemanticMediaWiki-1.7.1/specials/SearchTriple/SMW_SpecialBrowse.php(86): SMWSpecialBrowse->displayBrowse()
- 6 /var/www/oc.su/MediaWiki-1.18.1/includes/SpecialPageFactory.php(458): SMWSpecialBrowse->execute('???????????????...')
- 7 /var/www/oc.su/MediaWiki-1.18.1/includes/Wiki.php(240): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
- 8 /var/www/oc.su/MediaWiki-1.18.1/includes/Wiki.php(640): MediaWiki->performRequest()
- 9 /var/www/oc.su/MediaWiki-1.18.1/includes/Wiki.php(547): MediaWiki->main()
- 10 /var/www/oc.su/MediaWiki-1.18.1/index.php(57): MediaWiki->run()
- 11 {main}
Of course, I have database backed up before installing new extension, so I can just restore entire database. But someone may decide to stop using extra properties after long usage. How to stop using it? Van de Bugger (talk) 22:17, 26 March 2012 (UTC)
- That's not good... I will not have time to look into this for the next month, and I know far too little about the inner workings of Semantic MediaWiki to make a guess. Someone else? rotsee (talk) 19:45, 27 March 2012 (UTC)
- Did you run the scripts at Special:SMWAdmin? That is probably needed every time you install or uninstall an extension using special properties. rotsee (talk) 21:06, 27 March 2012 (UTC)
- We had a similar case with an SMW extension where a special property was declared but after de-activating of the extension the objects still persisted in the SMW database and forced a crash due non-existing definitions that where inherent by the extension (special page property) and not by SMW itself. For reference see [1]. I discussed this with Jeroen and for now SMW core lacks the ability to handle such cases to resolve non-existing special property definitions. The only way to resolve this issue is to run Special:SMWAdmin. MWJames (talk) 07:39, 29 March 2012 (UTC)
WMF git repo
[edit]First of all: great work on this extension! :)
I'd be very neat to have it in the WMF git repo stuff like most of the other SMW extensions which makes it easier for interested developers (which includes me) to track changes and provide feedback. It also gives you more visibility (people will see the extension if they look in the extension list, and changes will be automatically linked to on the IRC channel).
You can request a repository here: https://www.mediawiki.org/wiki/Git/New_repositories/Requests
You can then just push all your current commits to it and retain your full version history and stuff :) If you want me to help out with this, you can add me in the "developer" column as well (username: jeroendedauw). Jeroen De Dauw (talk) 17:12, 21 June 2012 (UTC)
- +1 on this extension. I would like to see this on Gerrit as well. Nischayn22 (talk) 11:59, 25 October 2012 (UTC)
- I added you as a developer now (I think), feel free to move it if you have the time! rotsee (talk) 22:44, 27 October 2012 (UTC)
- I'm afraid you partially misunderstood me. I suggested you creating a request for a new WMF git repository with you having access it it, and then me as well in case you wanted me to help move the code. Nischayn22 already went ahead and created such a request, which currently has his and my accounts listed as people who will get access. Steps for you to take now are:
- Request Developer access (ie get an account)
- Add yourself to the list of developers for your extension Jeroen De Dauw (talk) 14:55, 30 October 2012 (UTC)
- Ok, sorry for being a bit stupid here, programming really isn't my trade (even if I enjoy it), so all this svn/git/gerrit stuff is still a bit scary. I have developer access now, and an account at labsconsole.wikimedia.org, and now I'm trying to figure out how to add myself to the list of developers. Could you please point me in the right direction? rotsee (talk) 22:41, 30 October 2012 (UTC)
- If you can do this fast (before the git repository is created), go to http://www.mediawiki.org/wiki/Git/New_repositories/Requests and add you labs username along with mine and Jeroen's for this extension. Nischayn22 (talk) 01:53, 31 October 2012 (UTC)
- You're not being stupid :) And this is not really a programming thing, but more a use-confusing-tools-correctly thing.
- The repo has been created (see the commit history here)
- Unfortunately you where not added to people with merge access. I have requested you to get access here. Please modify the name I put there (rotsee) in case you have a different username. Jeroen De Dauw (talk) 14:37, 31 October 2012 (UTC)
- Heiya, a really cool sheat sheet is available here. This one covers all you normally need. Cheers [[kgh]] (talk) 16:16, 31 October 2012 (UTC)
- Thanks! rotsee (talk) 19:19, 31 October 2012 (UTC)
- I'm afraid you partially misunderstood me. I suggested you creating a request for a new WMF git repository with you having access it it, and then me as well in case you wanted me to help move the code. Nischayn22 already went ahead and created such a request, which currently has his and my accounts listed as people who will get access. Steps for you to take now are:
Cannot see any output from this extension
[edit]MediaWiki = 1.19.1 PHP = 5.3.15-pl0-gentoo (apache2handler) MySQL = 5.1.62-log
Have installed the extension correctly and added the following to LocalSettings.php :
require_once("$IP/extensions/SemanticExtraSpecialProperties/SemanticExtraSpecialProperties.php");
$sespSpecialProperties[] = '_EUSER'; // Add properties for contributing users
$sespSpecialProperties[] = '_CUSER'; // Add property for creating user
$sespSpecialProperties[] = '_REVID'; // Add property with current revision ID
- Note that depending on local settings this value might not be very up to date.
- In case $wgDisableCounters is set to true this property will not be set.
$sespSpecialProperties[] = '_VIEWS'; // Add property with number of page views.
$sespSpecialProperties[] = '_NREV'; // Add property showing an estimated number of total revisions
$sespSpecialProperties[] = '_TNREV'; // Same but for the talk page, i.e. showing how much discussion is going on around this page
$sespSpecialProperties[] = '_SUBP'; // Add properties pointing to subpages
$sespSpecialProperties[] = '_MIMETYPE'; // Adding mimetype and mediatype in case the article object is NS_IMAGE/NS_FILE
$sespSpecialProperties[] = '_MEDIATYPE'; // Adding mimetype and mediatype in case the article object is NS_IMAGE/NS_FILE
$sespSpecialProperties[] = '_SHORTURL'; // Adding ShortUrl property, if ShortUrl Extension is installed
$sespSpecialProperties[] = '_METADATA'; // Adding some porperties based om image metadata (exif data), when available
$sespSpecialProperties[] = '_USERREG'; // Adding user registration date to user pages
$wgSESPExcludeBots = true;
But no matter how many pages I edit, I still don't see any of the extra properties info on the pages. What am I missing? 2A01:348:2FF:AB:1DA8:A0E7:77CB:F186 17:28, 14 October 2012 (UTC)
- That's odd! What version of SMW are you using? rotsee (talk) 22:41, 27 October 2012 (UTC)
Getting a fatal error: Call to undefined method WikiPage::getCreator()
[edit]Hi I'm running MS 1.19.3, SMW 1.8 and Semantic Extra Special Properties 0.2.7.
When I save a page I get the following error:
Fatal error: Call to undefined method WikiPage::getCreator() in /var/www/webapps/intranet/extensions/SemanticExtraSpecialProperties/SemanticExtraSpecialProperties.hooks.php on line 126
I guess something has been depreciated. Mitchelln (talk) 11:38, 19 December 2012 (UTC)
- 0.2.7 actually requires MediaWiki 1.20+, which is where the method was introduced! It's mentioned in the Readme, but could be more clear, I guess. rotsee (talk) 21:59, 20 December 2012 (UTC)
- Unfortunately, MW 1.20 breaks a number of extensions and also skinning (again). This is why I have to use the LTS version of MW. I guess this means I cannot use this extension any more :( Mitchelln (talk) 10:24, 23 April 2013 (UTC)
- This has been addressed in 0.2.8 alpha : I can use this extension again, yay!
- Thanks for the fix. Mitchelln (talk) 15:27, 26 April 2013 (UTC)
- Unfortunately, MW 1.20 breaks a number of extensions and also skinning (again). This is why I have to use the LTS version of MW. I guess this means I cannot use this extension any more :( Mitchelln (talk) 10:24, 23 April 2013 (UTC)
Thank you!
[edit]This looks like a great extension!
Previously I was using some hacks like this: http://smw.referata.com/wiki/Add_page_metadata_properties_to_a_page_(using_ED)
I have an idea for a similar extension that could be merged here... something along the lines of 'Semantic Property Properties'... basically to add a bunch of 'special' properties to each semantic property in the wiki. For example, which forms, pages, templates (classes) use the property, and what unique values the property has, and a count of each value.
Cheers, Dan Bolser (talk) 12:17, 22 February 2013 (UTC)
- Unique values and count would be nice, but how would you keep those properties updated? The values are likely to change much, much more often than the property page is edited, so I guess you would need to purge all relevant property pages every time an article is saved? rotsee (talk) 21:24, 25 March 2013 (UTC)
EUSER sorted by number of edits?
[edit]I would like to show all contributors of an article sorted by the number of edits each user has done so far.
Can I use EUSER to achieve this?
If not, can you think of a workaround or maybe a new extra property?
Thanks for your help! Stefahn (talk) 16:40, 22 March 2013 (UTC)
- That should be possible, you can count the edits for a user by doing something like
{{#ask:[[Page author::USERNAME]]|format=count}}, see i.e. http://xn--ssongsmat-v2a.nu/ssm/S%C3%A4songsmat:Anv%C3%A4ndarlista rotsee (talk) 21:20, 25 March 2013 (UTC)- It seems that
{{#ask:[[Page author::USERNAME]]|format=count}}gives me the total number of edits a user did on the entire wiki. - I rather wanted to have the number of edits the user did on a particular page. Is that possible as well?
- Thanks! Stefahn (talk) 16:42, 27 March 2013 (UTC)
- Oh, I see. No, that's not possible, as far as I can see. How about creating an extension that provides a magic work for getting that number, and then setting a property using that magic word? rotsee (talk) 21:30, 31 March 2013 (UTC)
- Thanks for the suggestion. If I'm more familiar with extension programming I might look into it. Would be perfect if I could show the percentages each user contributed (instead of the number of edits, which is misleading sometimes).
- Meanwhile I used Extension:Contributors - after some tweaks I got it running and now it shows the number of edits (Example). Stefahn (talk) 09:10, 1 April 2013 (UTC)
- Oh, I see. No, that's not possible, as far as I can see. How about creating an extension that provides a magic work for getting that number, and then setting a property using that magic word? rotsee (talk) 21:30, 31 March 2013 (UTC)
- It seems that
Undefined variable: firstAuthor
[edit]Hi. I'm running SESP version 0.2.8 alpha and when I run runJobs.php I'm getting the following error:
Notice: Undefined variable: firstAuthor in /var/www/webapps/wiki/extensions/Semantic-Extra-Special-Properties/SemanticExtraSpecialProperties.hooks.php
on line 255
Initialisation value '' is not a number.
Backtrace:
#0 /var/www/webapps/wiki/extensions/Semantic-Extra-Special-Properties/SemanticExtraSpecialProperties.hooks.php(276): SMWDINumber->__construct(NULL)
#1 [internal function]: SemanticESP::sespUpdateDataBefore(Object(SMWSQLStore3), Object(SMWSemanticData))
#2 /var/www/webapps/wiki/includes/Hooks.php(216): call_user_func_array('SemanticESP::se...', Array)
#3 /var/www/webapps/wiki/includes/GlobalFunctions.php(3856): Hooks::run('SMWStore::updat...', Array)
#4 /var/www/webapps/wiki/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php(216): wfRunHooks('SMWStore::updat...', Array)
#5 /var/www/webapps/wiki/extensions/SemanticMediaWiki/includes/SMW_ParseData.php(374): SMWStore->updateData(Object(SMWSemanticData))
#6 /var/www/webapps/wiki/extensions/SemanticMediaWiki/includes/SMW_ParseData.php(518): SMWParseData::storeData(Object(ParserOutput), Object(Title), true)
#7 [internal function]: SMWParseData::onLinksUpdateConstructed(Object(LinksUpdate))
#8 /var/www/webapps/wiki/includes/Hooks.php(216): call_user_func_array('SMWParseData::o...', Array)
#9 /var/www/webapps/wiki/includes/GlobalFunctions.php(3856): Hooks::run('LinksUpdateCons...', Array)
#10 /var/www/webapps/wiki/includes/LinksUpdate.php(99): wfRunHooks('LinksUpdateCons...', Array)
#11 /var/www/webapps/wiki/includes/job/RefreshLinksJob.php(49): LinksUpdate->__construct(Object(Title), Object(ParserOutput), false)
#12 /var/www/webapps/wiki/maintenance/runJobs.php(80): RefreshLinksJob->run()
#13 /var/www/webapps/wiki/maintenance/doMaintenance.php(105): RunJobs->execute()
#14 /var/www/webapps/wiki/maintenance/runJobs.php(110): require_once('/var/www/webapp...')
#15 {main}
I guess this is a bug?
Thanks Mitchelln (talk) 15:25, 26 April 2013 (UTC)
- did you run the SMW update script (from either Special:SMWAdmin or command line)? rotsee (talk) 13:26, 30 April 2013 (UTC)
What is the syntax for accessing the special properties?
[edit]I have been trying various methods to no avail. I have tried:
- VIEWS {{#ask: Page Name | ?_VIEWS}}
- NREV {{#show: Page Name | ?_NREV}}
- VIEWS {{#ask: Page Name | ?VIEWS}}
- NREV {{#show: Page Name | ?NREV}}
Is this correct? If so I must have some configuration issue.
MediaWiki 1.21.2 Semantic Extra Special Properties (Version 0.2.7) Semantic MediaWiki (Version 1.8.0.5)
Thanks, Pete. 205.172.241.11 13:11, 20 September 2013 (UTC)
- I am still not able to get the special properties to work. The system is blocking the use of those properties but they are not being populated by the show command. Any help?
- Thanks,
- Pete. 205.172.241.11 12:44, 23 September 2013 (UTC)
- The names on the special properties will vary depending on what language you use. For instance, the number of views will be held by a property called
Number of page viewsin English,Anzahl der Seitenaufrufein German orAntal sidvisningarin Swedish. You can visit any page in your wiki and click “browse” in the toolbox to see available properties for that page. Hope that helps! rotsee (talk) 07:44, 25 September 2013 (UTC)- That is exactly what I needed. Thanks! :) 205.172.241.11 17:31, 25 September 2013 (UTC)
- The names on the special properties will vary depending on what language you use. For instance, the number of views will be held by a property called
How does the _SUBP work?
[edit]How can I add a property that points to a sub page? THanks, P. 205.172.241.11 16:39, 24 October 2013 (UTC)
- What have you tried? The pages need to be in a namespace that actually have subpages turned on in LocalSettings.php, can that be the problem? rotsee (talk) 20:31, 12 November 2013 (UTC)
Initialisation value '' is not a number error.
[edit]Hi.
I'm running SMW 1.8.0.5 on SMW 1.21.2. My SESP version is 0.2.8. I'm getting errors when saving pages using a Semantic Form (v2.6). It does not happen everytime, but I cannot see a pattern. However, it is happening a lot.
Initialisation value '' is not a number.
Backtrace:
| Extended content |
|---|
|
Mitchelln (talk) 09:58, 23 January 2014 (UTC)
- Has been addressed and solved with [0].
- [0] https://github.com/SemanticMediaWiki/SemanticExtraSpecialProperties/pull/12 MWJames (talk) 05:30, 23 February 2014 (UTC)
SMW\UpdateJob and "non-static method ... should not be called statically"
[edit]Looking at my "SMW\UpdateJob" I see this warning pop up all the time:
Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback,
non-static method SemanticESP::sespUpdateDataBefore() should not be called statically in
/srv/www/mwcode/includes/Hooks.php on line 199</pre>
Could this be avoided? [[User:VolkoV|VolkoV]] ([[User talk:VolkoV|talk]]) 20:54, 23 January 2014 (UTC)
:Has been addressed and solved with [0].
:[0] https://github.com/SemanticMediaWiki/SemanticExtraSpecialProperties/pull/10 [[User:MWJames|MWJames]] ([[User talk:MWJames|talk]]) 05:28, 23 February 2014 (UTC)
== Factbox shows empty ==
Is there a way to suppress a Factbox if it only contains Extra Special Properties?
I enabled this extension and am using it to capture _CUSER. I wanted to enable Factboxes on all my pages that store an SMW property:
$smwgShowFactbox = SMW_FACTBOX_NONEMPTY;
When using ExtraSpecialProperties, ''all'' my pages now store a property. Even so, the factbox rendered in the footer of the pages isn't including the _CUSER property.
If I click on the magnifying glass link to go to the Special:Browse page, I can see the properties. [[User:Lsilverman|Lsilverman]] ([[User talk:Lsilverman|talk]]) 19:01, 6 February 2014 (UTC)
:Has been addressed with [0].
:[0] https://github.com/SemanticMediaWiki/SemanticExtraSpecialProperties/pull/20 [[User:MWJames|MWJames]] ([[User talk:MWJames|talk]]) 05:29, 23 February 2014 (UTC)
== Revision ID is different when viewed in page versus Browse Properties ==
:I've been attempting to write an #ask query that excludes the current page from the result set. I found it discussed here: http://smw.referata.com/wiki/Excluding_a_page_from_an_inline_query
:I enabled the _REVID extra special property, ran the maintenance task SMW_refreshData.php, and waited for it to finish.
:My query is very simple, but doesn't exclude the current page:
:<syntaxhighlight lang='text'>{{#ask: [[Category:MyCategory]] [[Revision ID::!{{REVISIONID}}]]
|format=ul
}}
</syntaxhighlight>
:When I embed <code>{{REVISIONID}}</code> in the page, I get the correct revision number: '''22586'''
:When I view Browse Properties, I get a completely different number: '''1136'''
:Not sure what to try next. [[User:Lsilverman|Lsilverman]] ([[User talk:Lsilverman|talk]]) 03:39, 19 February 2014 (UTC)
::See [https://github.com/SemanticMediaWiki/SemanticExtraSpecialProperties/pull/10#issuecomment-35146704 github.com#10#issuecomment-35146704]. [[User:MWJames|MWJames]] ([[User talk:MWJames|talk]]) 11:15, 19 February 2014 (UTC)
:I seem to be experiencing this as well. Is there an explanation to this problem? {{FlowMention|MWJames}}, are you saying there is solution to this issue? I read the github link you provided, but I couldn't figure out what I was supposed to be learning from the comment that applies to this issue. Can you clarify, please? [[User:Revansx|Revansx]] ([[User talk:Revansx|talk]]) 00:24, 26 October 2018 (UTC)
== Installation Help ==
Can someone guide me through an installation of this extension without a lot of geek speak?
I don't have a week to learn all of that just to use this extension.
I have installed Composer via the Windows exe file, directed at my PHP.exe inside the XAMPP installation I am running MediaWiki on.
I have a JSON file inside the MediaWiki folder that has two requires in it. SESP 1.5 and SBL 1.4.
However when I run Composer Update, it blithely ignores the composer.json file. Tells me I don't have some global composer.json in my Roaming directory.
Then proceeds to spit out something about GIT, and start downloading all of the random stuff that is already inside my Vendor folder.
It runs for hours on end and doesn't get anything at all that mentions those two extensions.
Can someone please either package up the extension/vendor files I need for this so I can just drop them into my MW installation folder? Or come up with a simpler guide to using Composer that cuts out all the crap I DON'T need. [[User:Crysis19|Crysis19]] ([[User talk:Crysis19|talk]]) 14:57, 30 September 2017 (UTC)
== Error with manual installation ==
{{Archive top|result=Installing manually without Composer is not possible. A [[semantic-mw:Individual_file_release|individual file release]] is a way out.|status=resolved}}
Hi,
I've tried to install this extension without Composer by adding the following line to LocalSettings.php:
<pre>require_once("$IP/extensions/SemanticExtraSpecialProperties/SemanticExtraSpecialProperties.php");
However, I get a white screen with the following error message. Could this be a problem with the extension loader? Any pointers welcome.
TIA
Frank
MediaWiki 1.27.4 | PHP 5.6.25 | Semantic MediaWiki 2.5.6 | BlueSpice 2.27.3
/hamwiki/ MWException from line 176 of /opt/rh/httpd24/root/var/www/html/hamwiki/includes/Hooks.php: Invalid callback \SESP\HookRegistry::onBeforeConfigCompletion in hooks for SMW::Config::BeforeCompletion
Backtrace:
#0 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/includes/Settings.php(181): Hooks::run(string, array)
#1 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/src/Services/SharedServicesContainer.php(69): SMW\Settings::newFromGlobals()
#2 [internal function]: SMW\Services\SharedServicesContainer->SMW\Services\{closure}(Onoi\CallbackContainer\CallbackContainerBuilder)
#3 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/vendor/onoi/callback-container/src/CallbackContainerBuilder.php(260): call_user_func_array(Closure, array)
#4 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/vendor/onoi/callback-container/src/CallbackContainerBuilder.php(288): Onoi\CallbackContainer\CallbackContainerBuilder->getReturnValueFromCallbackHandlerFor(string, array)
#5 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/vendor/onoi/callback-container/src/CallbackContainerBuilder.php(195): Onoi\CallbackContainer\CallbackContainerBuilder->getReturnValueFromSingletonFor(string, array)
#6 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/src/ApplicationFactory.php(230): Onoi\CallbackContainer\CallbackContainerBuilder->singleton(string)
#7 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/src/MediaWiki/MwCollaboratorFactory.php(149): SMW\ApplicationFactory->getSettings()
#8 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/includes/Setup.php(108): SMW\MediaWiki\MwCollaboratorFactory->newMediaWikiDatabaseConnectionProvider(string)
#9 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/includes/Setup.php(55): SMW\Setup->registerConnectionProviders()
#10 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/load.php(132): SMW\Setup->run()
#11 /opt/rh/httpd24/root/var/www/html/hamwiki/extensions/SemanticMediaWiki/load.php(54): SemanticMediaWiki::onExtensionFunction()
#12 [internal function]: SemanticMediaWiki::{closure}()
#13 /opt/rh/httpd24/root/var/www/html/hamwiki/includes/Setup.php(838): call_user_func(Closure)
#14 /opt/rh/httpd24/root/var/www/html/hamwiki/includes/WebStart.php(137): require_once(string)
#15 /opt/rh/httpd24/root/var/www/html/hamwiki/index.php(40): require(string)
#16 {main}
Nakohdo (talk) 11:41, 31 August 2018 (UTC)
- That's not possible. You imperatively have to use Composer. [[kgh]] (talk) 12:01, 31 August 2018 (UTC)
- Many thanks for the quick reply and this information! Nakohdo (talk) 12:30, 31 August 2018 (UTC)
- You could do something like an individual file release on a laptop or so which has Composer and move over the files to your webspace. [[kgh]] (talk) 15:53, 31 August 2018 (UTC)
add CDATE feature please
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
How hard would it be to get a CDATE magic word from SESP that provides the page creation date similar to the CUSER magic word that provides the User who created the page. Revansx (talk) 18:24, 25 October 2018 (UTC)
- I believe that I pointed you to the correct spot. In the future I will ignore any post that is being duplicated in one way or the other. [[kgh]] (talk) 01:08, 26 October 2018 (UTC)
USERGROUP not working for custom user groups
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
The SESP parameter "_USERGROUP" which adds a property to user pages with the users assigned groups .. works well for built-in mw groups, however, I can not seem to get it to work for custom groups. For example, I add:
$wgGroupPermissions['team-A']['read'] = true;
to my LocalSettings.php and the group exists in the Modify User Rights spacial page
I add the user to the group "team-A" and that works well.
SESP however does not pick up on this.
Am I missing a step?
Can someone confirm this. Revansx (talk) 21:41, 27 February 2019 (UTC)
- @Hexmode, any ideas? Revansx (talk) 21:42, 27 February 2019 (UTC)
- Works for me. You did refresh the semantic data of the respective user's page? [[kgh]] (talk) 21:52, 27 February 2019 (UTC)
- yes. i had to do that to get the custom groups to show in SESP.. but it seems that it's not tracking the updates even after I make sure the job queue is clear
Revansx (talk) 23:40, 27 February 2019 (UTC)- For the jobs to roll in you need at least SMW 3.0.0. Until then you can rebuild the data for the user pages on a regular basis via cron. [[kgh]] (talk) 08:52, 28 February 2019 (UTC)
Can we add "Watch List Users" to SESP
[edit]In an enterprise environment, being able to query the page watchers would be a valuable feature. Can we add "Watch List Users" to SESP please? Revansx (talk) 02:01, 28 March 2019 (UTC)
SMW 3.0.0 and Approved Revisions 1.0
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
- MediaWiki: 1.31.1 (a4c8065)
- Semantic MediaWiki: 3.0.0
- Semantic Extra Special Properties: 2.0.0
- Approved Revs: 1.0 (b2f77fb) 15:21, 28 January 2019 (MEZA)
Semantic Properties for Approval status do not update until the next page edit.
I was told that this problem would be fixed by upgrading to SMW 3.0.0, but it is not. Am I missing something? Revansx (talk) 18:28, 19 June 2019 (UTC)
- A classic cross-post - again. Continued here [[kgh]] (talk) 20:18, 1 July 2019 (UTC)
Number of Duplicate Files in SESP
[edit]In my perfect world -- SESP would provide the number of duplicates for every file as a property so one could write a statement like:
[[{{{1}}}]] has {{#show:{{{1}}}|?Has Num Of Duplicates}} duplicates. Is thatRevansx (talk) 15:55, 27 September 2019 (UTC)
Extending SESP to include Real Name for User pages
[edit]I think I read that it is now possible to extend SESP to include additional user defined properties. Am I understanding this correctly? If so, does anyone know off-hand if it is possible in theory for a site to add the user's real name to the list of SESP properties or user pages? Revansx (talk) 13:49, 27 April 2020 (UTC)
Upgrading mediawik 1.31.8 to 1.35.1
[edit]MediaWiki 1.35.1
PHP 7.4.15 (apache2handler) MySQL 8.0.23 Semantic MediaWiki 3.2.2 Semantic Extra Special Properties 2.1.0
When running the php maintenance\update.php, Im getting the following error.
Importing from sesp.groups.json ...
... smw/schema:Group:Extra special properties ... [FAILED]
├ smw-schema-error-input-schema, property-group-schema.v1
└ smw-schema-error-violatio ... lue found, but an object is required
... smw/schema:Group:Exif special properties ... [FAILED]
├ smw-schema-error-input-schema, property-group-schema.v1
└ smw-schema-error-violatio ... lue found, but an object is required
... done.
Importing from smw.groups.json ...
... smw/schema:Group:Schema properties ...PHP Notice: Undefined index: implicit in D:\Bitnami\wampstack\apps\mediawiki\includes\user\UserGroupManager.php on line 267
Notice: Undefined index: implicit in D:\Bitnami\wampstack\apps\mediawiki\includes\user\UserGroupManager.php on line 267
[EXISTS,REPLACE]
... smw/schema:Group:Predefined properties ...PHP Notice: Undefined index: implicit in D:\Bitnami\wampstack\apps\mediawiki\includes\user\UserGroupManager.php on line 267
Notice: Undefined index: implicit in D:\Bitnami\wampstack\apps\mediawiki\includes\user\UserGroupManager.php on line 267
[EXISTS,REPLACE]
Any help would be great,
Thanks Legaulph (talk) 15:15, 30 March 2021 (UTC)
- Just hit this, @Legaulph
- Did you figure it out? NotYour007 (talk) 19:11, 2 September 2022 (UTC)
- I must have, I don't remember how.
- I'm onto a new issue now php 7.4 is going EOL and SMW is not working with 8.1 or 8.0
- https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/5304 Plegault3397 (talk) 23:24, 2 September 2022 (UTC)
- Sorry to hear. I looked into the file in question extensions/SemanticMediaWiki/src/SPARQLStore/RepositoryConnectionProvider.php and there's a comment just below that points to HttpDatabaseConnectionException reports curl error: 56 (Problem (2) in the Chunked-Encoded data) · Issue #1306 · SemanticMediaWiki/SemanticMediaWiki (github.com)
- Sounds related? NotYour007 (talk) 16:08, 6 September 2022 (UTC)
Inline Query
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I am struggling to incorporate extra special properties link _EUSER or _CUSER into a wiki-page. I am trying to automatically display the authors of an article within this article.
What would this query look like? Thanks.. 88.130.155.122 (talk) 18:19, 13 May 2021 (UTC)
- For
_EUSERit would be: - [[kgh]] (talk) 03:50, 14 May 2021 (UTC)
{{#show: {{FULLPAGENAME}} |?Page author }}