Topic on Extension talk:FancyBoxThumbs

Only works after re-loading page

4
Sm8ps (talkcontribs)

(V2.1 on MW1.23)

Upon first loading of the page, the thumbs in the gallery do not get opened with FancyBox but instead link to the respective file page. Only after re-loading the page with the gallery does it work.

This is what I see at first in the Java-Console of Firefox:

<code>ReferenceError: fbtFancyBoxOptions is not defined ReferenceError: fbtFancyBoxOptions is not defined</code>

<code>Stack-Trace:</code>

<code>@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=ext.FancyBoxThumbs%7Cext.gadget.HotCat%7Cjquery.checkboxShiftClick%2Chidpi%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions%2CtabIndex%7Cmediawiki.action.view.postEdit%7Cmediawiki.api%2Ccldr%2Chidpi%2CjqueryMsg%2Clanguage%2CsearchSuggest%2Cuser%7Cmediawiki.api.watch%7Cmediawiki.language.data%2Cinit%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cskins.vector.collapsibleNav&skin=vector&version=20151019T075613Z&*:33:843</code>

<code>@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=ext.FancyBoxThumbs%7Cext.gadget.HotCat%7Cjquery.checkboxShiftClick%2Chidpi%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions%2CtabIndex%7Cmediawiki.action.view.postEdit%7Cmediawiki.api%2Ccldr%2Chidpi%2CjqueryMsg%2Clanguage%2CsearchSuggest%2Cuser%7Cmediawiki.api.watch%7Cmediawiki.language.data%2Cinit%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cskins.vector.collapsibleNav&skin=vector&version=20151019T075613Z&*:32:1</code>

<code>runScript@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20151019T072552Z:156:934</code>

<code>execute/</checkCssHandles@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20151019T072552Z:157:353</code>

<code>execute/</cssHandle/<@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20151019T072552Z:157:483</code>

<code>jQuery.Callbacks/fire@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20151019T072552Z:13:1</code>

<code>jQuery.Callbacks/self.fireWith@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20151019T072552Z:15:253</code>

<code>jQuery.Callbacks/self.fire@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20151019T072552Z:15:296</code>

<code>addEmbeddedCSS@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20151019T072552Z:152:1</code>

<code>addEmbeddedCSS/<@http://my.wiki.net/load.php?debug=false&lang=de-ch&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20151019T072552Z:151:453</code>

After re-loading the page there is no Java-error at all.

Does this mean that one '''has''' to define fbtFancyBoxOptions? This would make options non-optional. :) I cannot check right now but will get back with my findings.

Sm8ps (talkcontribs)

Found out that I do have fbtFancyBoxOptions defined; here it is:

$fbtFancyBoxOptions = '{"arrows":"false","closeBtn":"false","helpers":{"title":{"type":"inside"}}}';

Now the error message does not make sense to me anymore. Could it be an early time-out? There does not seem to be noticeable lag while loading the page. Any ideas anybody?

Sm8ps (talkcontribs)

I am still being bitten by this strange behaviour. Each time I am presenting a gallery from my Wiki, I have to basically reload each page before FancyBoxThumbs works.

There does not seem any good explanation but I remarked that it usually happens when loading multiple pages (from the same wiki) in new tabs. Somehow the necessary information does not get loaded.

I just tested this: Upon launching ten new tabs with galleries, six of them did not load FancyBoxThumbs properly. There was no particular order (nrs. 1, 2, 4-7 affected). This is on Firefox 48 running on a i5 processor and connecting over the local gigabit net to the server which is reasonably fast, too.

Could that be a hint about how to fix the problem? Any input appreciated!

Henryfunk (talkcontribs)

I see the same symptoms at www.irhb.org. They occur also in Chrome.

Reply to "Only works after re-loading page"