Open main menu

Extension talk:Semantic Extra Special Properties

About this board

add CDATE feature please

2
Summary by Kghbln

See the issue on GitHub

Revansx (talkcontribs)

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.

Kghbln (talkcontribs)

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.

Revision ID is different when viewed in page versus Browse Properties

3
Lsilverman (talkcontribs)

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:

{{#ask: [[Category:MyCategory]] [[Revision ID::!{{REVISIONID}}]]
|format=ul
}}

When I embed {{REVISIONID}} 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.

Revansx (talkcontribs)

I seem to be experiencing this as well. Is there an explanation to this problem? @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?

Reply to "Revision ID is different when viewed in page versus Browse Properties"

Error with manual installation

4
Summary by Kghbln

Installing manually without Composer is not possible. A individual file release is a way out.

Nakohdo (talkcontribs)

Hi,

I've tried to install this extension without Composer by adding the following line to LocalSettings.php:

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}
Kghbln (talkcontribs)

That's not possible. You imperatively have to use Composer.

Nakohdo (talkcontribs)

Many thanks for the quick reply and this information!

Kghbln (talkcontribs)

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.

Crysis19 (talkcontribs)

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.

Reply to "Installation Help"

Initialisation value '' is not a number error.

2
Mitchelln (talkcontribs)

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:

Reply to "Initialisation value '' is not a number error."
Lsilverman (talkcontribs)

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.

Reply to "Factbox shows empty"

SMW\UpdateJob and "non-static method ... should not be called statically"

2
VolkoV (talkcontribs)

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

Could this be avoided?

Reply to "SMW\UpdateJob and "non-static method ... should not be called statically""
205.172.241.11 (talkcontribs)

How can I add a property that points to a sub page? THanks, P.

Rotsee (talkcontribs)

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?

Reply to "How does the _SUBP work?"

What is the syntax for accessing the special properties?

4
205.172.241.11 (talkcontribs)

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 (talkcontribs)

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.

Rotsee (talkcontribs)

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 views in English, Anzahl der Seitenaufrufe in German or Antal sidvisningar in 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!

Reply to "What is the syntax for accessing the special properties?"
Mitchelln (talkcontribs)

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

Rotsee (talkcontribs)

did you run the SMW update script (from either Special:SMWAdmin or command line)?

Reply to "Undefined variable: firstAuthor"
Return to "Semantic Extra Special Properties" page.