Manual talk:Page props table

From mediawiki.org
Latest comment: 7 years ago by Ciencia Al Poder in topic insert error in page_props table

The fact that this is only in use with __HIDDENCAT__ seems strange given the new category table has a cat_hidden field. Aristotle 18:20, 16 August 2008 (UTC)Reply

Were there other future uses that this table was created with in mind?[edit]

Tisane 10:31, 31 March 2010 (UTC)Reply

using this table from code[edit]

I couldn't find any documentation of this, but it appears that if you want to store data in this table (from an extension), it's quite simple:

$parser->mOutput->setProperty(name,value);

This goes into an array which gets written to the table at save-time.

I don't know if this is the best way to retrieve mOutput; I was hoping for an access function, but couldn't find one. Maybe MW1.17 has something.

--Woozle 13:08, 8 May 2011 (UTC)Reply

I tried to give an example extension using this in this edit. I hope its helpful. If you're not in the context of a parser function or hook (and a couple of very specific hooks) its somewhat hard to retrieve the parser output. If you're not coming directly from a page parse, people generally query the db directly (See things like WikiPage::getHiddenCategories() ). Bawolff 23:21, 11 February 2012 (UTC)Reply

New fields pp_page_namespace and pp_page_title[edit]

Would it be a good idea to add new fields pp_page_namespace and pp_page_title? It might eliminate the need to do a lot of JOINs with the page table when an extension wants to (1) select pages with a certain pp_propname/pp_value and a certain namespace or (2) select pages with a certain pp_propname/pp_value and sort them by page title. It would be useful for, e.g., Extension:BedellPenDragon, which seeks to have a Special:Glossary to list all the pages alphabetically by page title that have a short summary in the page_props table. Likewise, it would be helpful to have a cl_page_namespace and cl_page_title in the categorylinks table so that page namespaces and page titles could be used as filtering criteria in the <randompageincategory> tag. Leucosticte (talk) 08:22, 10 November 2013 (UTC)Reply

insert error in page_props table[edit]

All,

Someone help me if you can.

i am having an application which uses PHP+Mediawiki.

On saving a page, i am getting an insertion error at PAGE_PROPS table:

INSERT INTO /*Q*/PAGE_PROPS (pp_page,pp_propname,pp_value) VALUES (:pp_page, :pp_propname, NULL) Function DatabaseOracle::insertOneRow Error 1400 ORA-01400: cannot insert NULL into ("APP", "PAGE_PROPS","PP_VALUE")

This seems to be occuring only when double underscored words (e.g. __NOTOC__) are present in the page.

Any idea, what needs to be done to resolve this issue ?

Thanks — Preceding unsigned comment added by Mparthas25 (talk • contribs)

Try disabling all extensions. If it's still happening, you should report a bug with all information about what MediaWiki version and since when it's happening (after an upgrade?) --Ciencia Al Poder (talk) 10:32, 24 January 2017 (UTC)Reply