Extension talk:PageInCat
Add topic| This page used the Structured Discussions 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. |
Fatal error
[edit]Using MediaWiki 1.17.0 I get a "Fatal error: Class 'RequestContext' not found in /var/www/wiki/extensions/PageInCat/PageInCat_body.php on line 231" with the extension installed whenever I try to preview any edit on any page (doesn't matter if it uses {{#incat: or not). I can still save page edits. Other than that the extension works great. -- Ned Scott 03:36, 8 January 2012 (UTC) 07:52, 8 January 2012 (UTC)
- Never mind, I missed the part where it requires 1.19. -- Ned Scott 04:59, 8 January 2012 (UTC) 07:52, 8 January 2012 (UTC)
- Honestly none of this really depends on stuff in 1.19. Replacing the line:
$curUser = RequestContext::getMain()->getUser()- with
$curUser = $GLOBALS['wgUser'];- would in all probability make it work (of course I haven't tested that). Bawolff 19:01, 8 January 2012 (UTC)
- Or apparently not as its also dependant on wfMsg stuff.
- Anyhow, I did some checking. This extension should work with any version of MediaWiki greater than or equal to 1.18. I've updated the doc page accordingly Bawolff 01:12, 24 January 2012 (UTC)
Good idea
[edit]I'm really not sure why this function wasn't made a part of Parser Functions from the beginning. It seems so basic. But thanks as always Bawolff, for giving the functionality in an extension. 19:31, 3 February 2012 (UTC)
- Well in order to make this extension work during preview it had to do some hacky things (Since pages aren't really in a category until its saved, during a preview its not in the newly added category, etc). The way it works around this is the best way i could think of, but its still a little icky, and would be frowned upon if this extension was being reviewed for wikimedia deployment, which is one reason this probably won't appear in parserFunctions extension anytime soon. Bawolff 20:08, 4 February 2012 (UTC)
Doesn't Work
[edit]I installed according to the directions and now get:
Warning: require_once(/home/herbal7/public_html/mwiki/extensions/PageInCat/PageInCat.php): failed to open stream: No such file or directory in/home/herbal7/public_html/mwiki/LocalSettings.php on line 217
Fatal error: require_once(): Failed opening required '/home/herbal7/public_html/mwiki/extensions/PageInCat/PageInCat.php' (include_path='/home/herbal7/public_html/mwiki/vendor/pear/pear_exception:/home/herbal7/public_html/mwiki/vendor/pear/console_getopt:/home/herbal7/public_html/mwiki/vendor/pear/pear-core-minimal/src:/home/herbal7/public_html/mwiki/vendor/pear/mail_mime:/home/herbal7/public_html/mwiki/vendor/pear/mail_mime-decode:/home/herbal7/public_html/mwiki/vendor/pear/net_socket:/home/herbal7/public_html/mwiki/vendor/pear/net_smtp:/home/herbal7/public_html/mwiki/vendor/pear/mail:.:/usr/local/lib/php') in /home/herbal7/public_html/mwiki/LocalSettings.php on line 217
<hr>
I notice that there's no PageInCat.php in the extensions/PageInCat directory, so obviously this is the problem. I downloaded from three places, and it's not there in any of them. If I changed the name to PageInCat_body.php in LocalSettings.php, the above error goes away, but the #incat code doesn't work (I see the curly braces and everything.) 76.9.87.51 (talk) 22:58, 8 August 2016 (UTC)
- Sorry, some instructions were outdated. You should now install this extension by doing wfLoadExtension( 'PageInCat' ); Bawolff (talk) 18:28, 25 August 2016 (UTC)
Compatible with MW 1.34.x?
[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 getting an "Call to undefined method ParserOptions::setEditSection()" error when trying to create a category. Reported with T235602. [[kgh]] (talk) 07:59, 16 October 2019 (UTC)
Help
[edit]This message always appears to a page containing a category, even if the #incat parser function is not used.
Warning: The category Pages with broken file links was detected incorrectly by {{#incat:...}}, and as a result this preview may be incorrect. This can be caused by including categories inside of {{#incat:...}} statements, and may result in inconsistent display.
Content of the page:
{{Policy}} This page is a general overview of all the policies. There are multiple policies practiced on Blookipedia, and are listed below. == General article rules and adequate == # Articles should show a neutral point of view, it should not contain personal opinions. # Articles should be written in a formal tone, not in a funny or comic tone. Users should avoid using textspeak words. # Articles must only contain content that is appropriate for all ages. # Articles should not be written in second person. Example: ''You need the have 20 tokens the open a pack'' should be ''The player must have 20 tokens to open a pack''. [[Category:Policies]] Acnh Player (talk) 10:54, 28 June 2024 (UTC)
- Use precopy text please – line in wikicode start with a space.
here is example- In code template 'Policy' is probably your problematic code. Want (talk) 16:06, 10 July 2024 (UTC)
- My point is, there is no #incat parser function on the page Acnh Player (talk) 04:10, 11 July 2024 (UTC)
- Function is transcluded from template probably. Warning is symptom, that automatic generated category "Pages with broken file links" inexists. I don't use this extension because Extension:CategoryTests do same effect, but I tested it. Want (talk) 08:29, 11 July 2024 (UTC)
Dynamic property access deprecation as of 1.42
[edit]Deprecated: Use of MediaWiki\Parser\Parser::$pageInCat_cache was deprecated in MediaWiki 1.42. [Called from PageInCat::onClearState in [...]/PageInCat.php at line 174] in /[...]/includes/debug/MWDebug.php on line 379
Deprecated: Use of MediaWiki\Parser\Parser::$pageInCat_onlyCache was deprecated in MediaWiki 1.42. [Called from PageInCat::onClearState in [...]/PageInCat.php at line 175] in /[...]/includes/debug/MWDebug.php on line 379
The errors above are currently showing up when including the library in a 1.42 project, please migrate this dynamic prop access. Randomage (talk) 02:05, 29 October 2024 (UTC)
- It should be noted, these are just warnings not errors at this stage and won't negatively affect anything. Bawolff (talk) 04:02, 29 October 2024 (UTC)