Extension talk:MagicNoCache

About this board

previous talk on this page

Enabling on 1.35 causes error 500

TiltedCerebellum (talkcontribs)

Enabling MagicNoCache extension distributor version or master for 1.35, on 1.35, via <code>wfLoadExtension( 'MagicNoCache' );</code> causes error 500. I'll have to start disabling extensions or install a clean 1.35 to see if it is a clash with another extension or not.

MediaWiki 1.35.0
PHP 7.4.12 (cgi-fcgi)
MySQL 5.7.28-log
ICU 57.1
Reply to "Enabling on 1.35 causes error 500"

Does not work on Mediawiki 1.31 ?

Aloist (talkcontribs)

I try to use it on mediawiki 1.31 but it does not work.

I have $wgUseFileCache = true;

Aloist (talkcontribs)
Revansx (talkcontribs)

what was the error?

Kghbln (talkcontribs)

I do not think it makes sense to use file caching and this extension at the same time. File caching means that a static copy of a given page is saved in the cache directory. I am not sure if the behaviour switch causes the page not being saved in the first place.

Does not work on Mediawiki 1.35

Summary by Kghbln

Fix merged into master (version 1.6.0)!

Calebgcooper (talkcontribs)

When runing lastest build of MagicNoCache with mediawiki 1.35.0-alpha (e7493e3) enabling the extension results in the following backtrace:

[21990638edd9a383f993fb30] /Main_Page Error from line 13 of /var/lib/mediawiki/extensions/MagicNoCache/MagicNoCache.hooks.php: Call to undefined method MagicWord::get()


#0 /var/lib/mediawiki/includes/Hooks.php(174): MagicNoCacheHooks::magicwordCheck(Parser, string, StripState)
#1 /var/lib/mediawiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#2 /var/lib/mediawiki/includes/parser/Parser.php(1501): Hooks::run(string, array)
#3 /var/lib/mediawiki/includes/parser/Parser.php(599): Parser->internalParse(string)
#4 /var/lib/mediawiki/includes/cache/MessageCache.php(1298): Parser->parse(string, Title, ParserOptions, boolean)
#5 /var/lib/mediawiki/includes/language/Message.php(1253): MessageCache->parse(string, Title, boolean, boolean, LanguageEn)
#6 /var/lib/mediawiki/includes/language/Message.php(881): Message->parseText(string)
#7 /var/lib/mediawiki/includes/language/Message.php(934): Message->toString(string)
#8 /var/lib/mediawiki/includes/skins/Skin.php(956): Message->parse()
#9 /var/lib/mediawiki/includes/skins/SkinTemplate.php(388): Skin->lastModified()
#10 /var/lib/mediawiki/includes/skins/SkinTemplate.php(219): SkinTemplate->prepareQuickTemplate()
#11 /var/lib/mediawiki/includes/OutputPage.php(2593): SkinTemplate->outputPage()
#12 /var/lib/mediawiki/includes/MediaWiki.php(978): OutputPage->output(boolean)
#13 /var/lib/mediawiki/includes/MediaWiki.php(991): MediaWiki->{closure}()
#14 /var/lib/mediawiki/includes/MediaWiki.php(534): MediaWiki->main()
#15 /var/lib/mediawiki/index.php(47): MediaWiki->run()
#16 {main}
Kghbln (talkcontribs)
Pastakhov (talkcontribs)

Thanks for pinging! :)

Kghbln (talkcontribs)
Summary by Kghbln

This extension will no longer be tagged.

Kghbln (talkcontribs)

@Pastakhov:, @Reception123: It will be great if the version 1.5.0 (8eeb457035d5477b8aab8512c81d2c48a2a9e714) gets tagged in the repo. @Reception123 If you update extensions it will be utterly cool if you could also docu this on the extension's page. I do not watch all the repos of the extensions I am using but I do watch the extension's pages. I guess this will help not just me. Thanks a ton.

Pastakhov (talkcontribs)

Hi Kghbln, Sorry for so later reply, do you still need MagicNoCache be tagged with 1.5.0?

Kghbln (talkcontribs)

No worries. I switched to release branches here however I still think it will be nice to have it tagged since it was always tagged. I personally missed the latest code changes since it was not tagged until I switched.

How to hide __NOCACHE__?

Summary by Johnywhy

Enable this extension, or just remove __NOCACHE__ from pages

Johnywhy (talkcontribs)
I put __NOCACHE__ in a template. 
__NOCACHE__ is visibly displayed on the template. 

How to hide it?

If I wrap it in comment tags, will it still work?


Kghbln (talkcontribs)

If the behaviour switch is shown then most likely this extension is not installed. In this case just remove it from the template.


ManosHacker (talkcontribs)

{{REVISIONID}} can be used to adapt a template behavior, depending on edit or read mode. An example is here (user sandbox pages control) and here (user sandbox subpage) where the {{user sandbox+}} template adapts on edit, in both pages. Lately this functionality broke in the VisualEditor and is only functional in the old source editor, or after switching from source to visual, due to caching of the template during reading the page. Can __NOCACHE__ help restore such template functionality?

Reply to "__NOCACHE__ and {{REVISIONID}}"
2A02:810A:12C0:577:A031:6B59:55DB:3F (talkcontribs)

I use <nowiki>__NOCACHE__</nowiki> on my start page. Some day ago the start page shows a database error.

This site has saved a copy in the cache.

I've to delete the cached .html und now the start page works again.

Why would a copy of the site saved in the cache if the site used the magic word?

Kghbln (talkcontribs)

What is your setup? MW, PHP, MySQL? What is the page showing if you add the following to "LocalSettings.php"?

$wgShowSQLErrors = true;
$wgShowDBErrorBacktrace = true;
2A02:810A:12C0:577:A031:6B59:55DB:3F (talkcontribs)
Software Version
MediaWiki 1.24.2
PHP 5.4.16 (cgi-fcgi)
MariaDB 5.5.52-MariaDB

I add both lines to the localSettings but the page shows nothing extra.

Kghbln (talkcontribs)

Probably file caching and this extension do not mix. What wonders me is that it appears to have worked for some time. Thanks for posting your setup. Perhaps others have an idea about the cause.

Reply to "Database error"

Tag 1.3.0

Summary by Pastakhov

add tag 1.3.0 to repo...

Kghbln (talkcontribs)
Pastakhov (talkcontribs)


Kghbln (talkcontribs)

Thanks a bunch!

Pastakhov (talkcontribs)

@Kghbln, you're welcome all time :-)

Kghbln (talkcontribs)

As a matter of fact I pretty much value your work on the extensions you create and maintain!

Reply to "Tag 1.3.0"

Minor bug with nowiki tag

Protnet (talkcontribs)

It shows nothing when <cοde><nοwiki>__NΟCACHE__</nοwiki></cοde> syntax is used.

I took the liberty to translate MediaWiki:Magicnocache-desc/el using this syntax <cοde><nοwiki>__NΟCACHE_</nοwiki></cοde><cοde><nοwiki>_</nοwiki></cοde> which is a working one in case someone would copy-paste it.

(But don't copy-paste any of my examples here, they use Greek "o" characters)!

Phorgo (talkcontribs)

I have replaced the hook ParserBeforeTidy with InternalParseBeforeLinks and it works now.

Protnet (talkcontribs)

Thanks! Will you upload it to Git?

Pastakhov (talkcontribs)

Thanks for report and help. I fixed it in version 1.2.2

Protnet (talkcontribs)

Thank you very much both!! Now it works like a charm! I updated the translation too.

Reply to "Minor bug with nowiki tag"

Incompatible with MW 1.19+

Kghbln (talkcontribs)

I just marked this extension as incompatible with MW 1.19 since it uses the hook MagicWordMagicWords which was removed. To have a fix for it to work on MW1.19.+ would be cool. Cheers

Pastakhov (talkcontribs)

I removed incompatible with MW 1.19. You can check whether it performs its mission? Download snapshot

Danwe (talkcontribs)

From looking at the code, I don't think it will still work on 1.19. The hook should probably stay to maintain downwards compatibility, but it has to be enhanced for MW 1.19+

Pastakhov (talkcontribs)

Here need only one hook ParserBeforeTidy, others simply do not need. Perhaps they were needed for older MediaWiki

Kghbln (talkcontribs)

Heiya Pastakhov, I just tested it on a MW 1.19.2 install and found it working as it should. As far as I am concerned this version is ready for offical release. Thank you so much for taking over support for this extension. Cheers

Pastakhov (talkcontribs)

Thank you for testing (talkcontribs)

What version works for 1.19? I downloaded from the tree and it didn´t worked. Never mind, snapshot worked! Thanks!

Reply to "Incompatible with MW 1.19+"
Return to "MagicNoCache" page.