Extension talk:MagicNoCache/Archive 2

About this board

previous talk on this page


error with MW 1.39.3

2
Jeffryjohar (talkcontribs)

I'm getting the following error during the migration:-


[wiki@hz25 mediawiki]$ php maintenance/update.php  --skip-config-validation



PHP Fatal error:  Uncaught Exception: Unable to open file /home/wiki/htdocs/mediawiki/extensions/MagicNoCache/extension.json: filemtime(): stat failed for /home/wiki/htdocs/mediawiki/extensions/MagicNoCache/extension.json in /home/wiki/htdocs/mediawiki/includes/registration/ExtensionRegistry.php:199

Stack trace:

#0 /home/wiki/htdocs/mediawiki/includes/GlobalFunctions.php(49): ExtensionRegistry->queue()

#1 /home/wiki/htdocs/mediawiki/LocalSettings.php(142): wfLoadExtension()

#2 /home/wiki/htdocs/mediawiki/includes/Setup.php(218): require_once('...')

#3 /home/wiki/htdocs/mediawiki/maintenance/doMaintenance.php(83): require_once('...')

#4 /home/wiki/htdocs/mediawiki/maintenance/update.php(312): require_once('...')

#5 {main}

  thrown in /home/wiki/htdocs/mediawiki/includes/registration/ExtensionRegistry.php on line 199

Kghbln (talkcontribs)

Did you update the extension's code, too? The error says that the extension's extension.json file cannot be found.

Reply to "error with MW 1.39.3"

Enabling on 1.35 causes error 500

1
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 ?

4
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

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

Backtrace:

#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__?

2
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?

Thx

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.

__NOCACHE__ and {{REVISIONID}}

1
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

5
Summary by Pastakhov

add tag 1.3.0 to repo...

Kghbln (talkcontribs)
Pastakhov (talkcontribs)

Done

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

6
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"
Return to "MagicNoCache/Archive 2" page.