[MediaWiki-l] Sidebar cache

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Sidebar cache

Tom Hutchison
Is sidebar cache really buggy enough to not even update the toolbox links like print page version? Or is that a unknown not normal bug?

Enabled, the print version link was static to one page on every page.

Thanks
Tom
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Platonides
On 01/02/13 20:08, Tom wrote:
> Is sidebar cache really buggy enough to not even update the toolbox links like print page version? Or is that a unknown not normal bug?
>
> Enabled, the print version link was static to one page on every page.
>
> Thanks
> Tom

What do you mean?
The print version link pointing to title=foo&printable=yes even on
article bar? That should never happen, the sidebar cache refers to the
"upper part" of the sidebar, not to the toolbox.


_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Tom Hutchison

------------------------------------------------------------------------
On 2/2/2013 5:28 PM, Platonides wrote:
> What do you mean?
> The print version link pointing to title=foo&printable=yes even on
> article bar? That should never happen, the sidebar cache refers to the
> "upper part" of the sidebar, not to the toolbox.
>
Sorry for not being clear, print/export, print version link. Seems like
everything else dynamic is unaffected, Toolbox links, etc. just the
printable version link becomes static.

title=foo&printable=yes is correct on foo, but never changes from foo. I
can go to foo1, foo2, foo3 and it will always show and link to
title=foo&printable=yes while the sidebar cache is enabled.

I just re-enabled to reverify and yes it locks the print version to the
current page when switched on in LocalSettings. If I open the wiki to
main page, it locks it there. To clear the cache, I have to disable the
sidebar cache.  Re-enable and open the wiki to a page I pick besides the
main page, it locks the printable version link to that page instead.  
Disable it, the printable link works again as expected. I didn't set the
cache expiry because 24 hours is fine, the default.

This is the notice on the manual page- "However it is also fragile:
changing the site configuration, or having a variable $wgArticlePath,
can produce broken links that don't update as expected."  I thought it
might be really, really fragile because we are using ArticlePath.  I
thought it referred just to navigation links and expected not to be able
to update the sidebar links on the fly without disabling and re-enabling
- unless I wanted to wait the 24 hours expiry time. We do have an extra
navigation set with a heading - Quick links, but I would thought the
design was leave dynamic alone, Toolbox and Print/export.

Version info,  yes I know there is a 19.3 - could that be the issue? I
did a bug search and didn't find anything.

MediaWiki    1.19.1
PHP    5.3.13 (cgi-fcgi)
MySQL    5.0.91-log

It is a major headache to update on this server...

Thanks
Tom


_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Tim Starling-2
On 03/02/13 13:40, Tom Hutchison wrote:
> Sorry for not being clear, print/export, print version link. Seems
> like everything else dynamic is unaffected, Toolbox links, etc. just
> the printable version link becomes static.

Using {{PAGENAME}} etc. in MediaWiki:Sidebar will not work if you
enable the sidebar cache, since the sidebar cache varies only on user
language, it doesn't try to work out what data you may have pulled in
via parser variables.

Instead, you may wish to add your link to the toolbox, by adding a
BaseTemplateToolbox hook. It can be done in LocalSettings.php:

function localBaseTemplateToolbox( &$tpl, &$toolbox ) {
    $toolbox['print_version'] = array(
        'text' => 'Print version',
        'href' => $tpl->getSkin()->getTitle()->getLocalURL( ... )
    );
    return true;
}
$wgHooks['BaseTemplateToolbox'][] = 'localBaseTemplateToolbox';

-- Tim Starling


_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Platonides
On 04/02/13 02:08, Tim Starling wrote:
> On 03/02/13 13:40, Tom Hutchison wrote:
>> Sorry for not being clear, print/export, print version link. Seems
>> like everything else dynamic is unaffected, Toolbox links, etc. just
>> the printable version link becomes static.
>
> Using {{PAGENAME}} etc. in MediaWiki:Sidebar will not work if you
> enable the sidebar cache, since the sidebar cache varies only on user
> language, it doesn't try to work out what data you may have pulled in
> via parser variables.

There is already a printable link in the toolbox, they don't need to
hack one with {{PAGENAME}} in MediaWiki:Sidebar. Although that would
indeed explain the behavior.


_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Svip
In reply to this post by Platonides
On 2 February 2013 23:28, Platonides <[hidden email]> wrote:

> What do you mean?
> The print version link pointing to title=foo&printable=yes even on
> article bar? That should never happen, the sidebar cache refers to the
> "upper part" of the sidebar, not to the toolbox.

I noticed on my wiki, that our sidebar had been pretty much static for
years.  So I decided to cache it, yet - somehow - it started appearing
in its prior version on certain pages.  Why is so old cache preserved?
 And why, considering I did not ask for it to cache the sidebar?

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Platonides
On 04/02/13 18:06, Svip wrote:
> I noticed on my wiki, that our sidebar had been pretty much static for
> years.  So I decided to cache it, yet - somehow - it started appearing
> in its prior version on certain pages.  Why is so old cache preserved?
>  And why, considering I did not ask for it to cache the sidebar?

The whole page is cached (either in your browser or by a proxy between
you and the wiki). When you visit a page it only checks if the page
content changed, changing the sidebar doesn't invalidate that (note it
would have a stampede effect).



_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Tom Hutchison
In reply to this post by Platonides
Actually, based on what Tim and Platonides stated - it might be the create a book extension. It is adding the Print/export item and removes the printable version link from the Toolbox. I don't have a {{PAGENAME}} link per my mediawiki:sidebar so create a book must be imposing its will. Plus doesn't play well with sidebar cache.  

Thanks
Tom

On Feb 4, 2013, at 11:59 AM, Platonides <[hidden email]> wrote:

> On 04/02/13 02:08, Tim Starling wrote:
>> On 03/02/13 13:40, Tom Hutchison wrote:
>>> Sorry for not being clear, print/export, print version link. Seems
>>> like everything else dynamic is unaffected, Toolbox links, etc. just
>>> the printable version link becomes static.
>>
>> Using {{PAGENAME}} etc. in MediaWiki:Sidebar will not work if you
>> enable the sidebar cache, since the sidebar cache varies only on user
>> language, it doesn't try to work out what data you may have pulled in
>> via parser variables.
>
> There is already a printable link in the toolbox, they don't need to
> hack one with {{PAGENAME}} in MediaWiki:Sidebar. Although that would
> indeed explain the behavior.
>
>
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Tom Hutchison
Not Create a Book, Extension:Collection - can't get that out of my head!

Looking at it now.

Tom

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Tom
Sent: Monday, February 04, 2013 12:25 PM
To: MediaWiki announcements and site admin list
Subject: Re: [MediaWiki-l] Sidebar cache

Actually, based on what Tim and Platonides stated - it might be the create a book extension. It is
adding the Print/export item and removes the printable version link from the Toolbox. I don't have
a {{PAGENAME}} link per my mediawiki:sidebar so create a book must be imposing its will. Plus
doesn't play well with sidebar cache.

Thanks
Tom




_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Tom Hutchison
In reply to this post by Platonides
Yep, Collection is forcing the printable to its section:

// Move the 'printable' link into our section for consistency
                if ( $action == 'view' || $action == 'purge' ) {
                        global $wgOut;
                        if ( !$wgOut->isPrintable() ) {
                                $attribs = array(
                                        'href' => $sk->getTitle()->getLocalUrl( $wgRequest->appendQueryValue( 'printable', 'yes',
true ) ),
                                        'title' => $sk->titleAttrib( 't-print', 'withaccess' ),
                                        'accesskey' => $sk->accesskey( 't-print' ),
                                );
                                if ( $attribs['title'] === false ) {
                                        unset( $attribs['title'] );
                                }
                                if ( $attribs['accesskey'] === false ) {
                                        unset( $attribs['accesskey'] );
                                }
                                $out .= Xml::tags( 'li',
                                        array( 'id' => 't-print' ),
                                        Xml::element( 'a', $attribs, wfMsg( 'printableversion' ) ) );
                        }
                }

Tom



_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Mlpearc
It is Extension:Collection that displays the "Print" link in the sidebar.
Another strange reaction from that extension is for some un-known reason
when the extension is enabled, it adds the page name of the selected page
to the category box.

Mlpearc

On Mon, Feb 4, 2013 at 9:44 AM, Tom Hutchison <[hidden email]> wrote:

> Yep, Collection is forcing the printable to its section:
>
> // Move the 'printable' link into our section for consistency
>                 if ( $action == 'view' || $action == 'purge' ) {
>                         global $wgOut;
>                         if ( !$wgOut->isPrintable() ) {
>                                 $attribs = array(
>                                         'href' =>
> $sk->getTitle()->getLocalUrl( $wgRequest->appendQueryValue( 'printable',
> 'yes',
> true ) ),
>                                         'title' => $sk->titleAttrib(
> 't-print', 'withaccess' ),
>                                         'accesskey' => $sk->accesskey(
> 't-print' ),
>                                 );
>                                 if ( $attribs['title'] === false ) {
>                                         unset( $attribs['title'] );
>                                 }
>                                 if ( $attribs['accesskey'] === false ) {
>                                         unset( $attribs['accesskey'] );
>                                 }
>                                 $out .= Xml::tags( 'li',
>                                         array( 'id' => 't-print' ),
>                                         Xml::element( 'a', $attribs,
> wfMsg( 'printableversion' ) ) );
>                         }
>                 }
>
> Tom
>
>
>
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>



--
*
Mlpearc*
Founder
Everything Food & Drink.org
everythingfoodanddrink.org<http://www.everythingfoodanddrink.org/w/index.php/Main_Page>
Phone: 760-718-1290
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Sidebar cache

Tom Hutchison
I never noticed that behavior.

Tom

On Feb 4, 2013, at 1:16 PM, Mlpearc <[hidden email]> wrote:

> It is Extension:Collection that displays the "Print" link in the sidebar.
> Another strange reaction from that extension is for some un-known reason
> when the extension is enabled, it adds the page name of the selected page
> to the category box.
>
> Mlpearc
>
> On Mon, Feb 4, 2013 at 9:44 AM, Tom Hutchison <[hidden email]> wrote:
>
>> Yep, Collection is forcing the printable to its section:
>>
>> // Move the 'printable' link into our section for consistency
>>                if ( $action == 'view' || $action == 'purge' ) {
>>                        global $wgOut;
>>                        if ( !$wgOut->isPrintable() ) {
>>                                $attribs = array(
>>                                        'href' =>
>> $sk->getTitle()->getLocalUrl( $wgRequest->appendQueryValue( 'printable',
>> 'yes',
>> true ) ),
>>                                        'title' => $sk->titleAttrib(
>> 't-print', 'withaccess' ),
>>                                        'accesskey' => $sk->accesskey(
>> 't-print' ),
>>                                );
>>                                if ( $attribs['title'] === false ) {
>>                                        unset( $attribs['title'] );
>>                                }
>>                                if ( $attribs['accesskey'] === false ) {
>>                                        unset( $attribs['accesskey'] );
>>                                }
>>                                $out .= Xml::tags( 'li',
>>                                        array( 'id' => 't-print' ),
>>                                        Xml::element( 'a', $attribs,
>> wfMsg( 'printableversion' ) ) );
>>                        }
>>                }
>>
>> Tom
>>
>>
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>
>
> --
> *
> Mlpearc*
> Founder
> Everything Food & Drink.org
> everythingfoodanddrink.org<http://www.everythingfoodanddrink.org/w/index.php/Main_Page>
> Phone: 760-718-1290
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l