Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-12-20 06:41:20

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Preferences Panel not displaying as tabs (TXP 4.7dev)

All sections are displayed at once (the anchors in the page navigation panel on the left hand side work of course). The Jquery-ui code is apparently not doing it’s job, none of the classes are set.

^^^
Edit: see my post below for a better description
^^^

Safari console flags this:

31530jQuery.Deferred exception: Can't find variable: selectedTab (2)
(anonymous function) — textpattern.js:1883
(anonymous function) — textpattern.js:873
each — jquery.js:2:2820
init — textpattern.js:870
(anonymous function) — textpattern.js:2021
j — jquery.js:2:29954
(anonymous function) — jquery.js:2:30264
undefined

Firefox console is some more verbose, but completely unreadable

Last edited by phiw13 (2016-12-21 07:15:56)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#2 2016-12-20 08:22:11

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: Preferences Panel not displaying as tabs (TXP 4.7dev)

Hmm, puzzling. On a brand-new install on localhost it all works fine. On existing installs, it fails. Wonder what is happening.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#3 2016-12-21 07:14:40

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: Preferences Panel not displaying as tabs (TXP 4.7dev)

So, my description of the issue above is not really correct / complete.

Clear cookies, caches, local storage (*)

  1. Visit the Preferences panel, notice that all preference subgroups are visible / open. Jquery-UI has not done its magic… (collapse all pref panes except the first one). Check your developper tools: console logs an error (and no local storage data has been set, but that is expected at this point.
  2. scroll down the (longish) list (don’t use the navigation links), modify a pref, save.
  3. Visit another panel, come back to the Prefs panel. Jquery-UI still doesn’t do any of its magic to ‘tabify’ the panel. Now click one of the links in the nav panel (e.g Admin). The browser scrolls down to desired section (URL is ?event=prefs#prefs_group_admin). Check your developper tools > Storage tab, notice that there is now entry in the Local Storage. Save (you probably have to scroll back up… eh). The browser window reloads and Jquery-UI has done its job… and the selected tab is remembered.

TXP 4.6 immediately allows Jquery-UI to do its job at step 1 above. There are differences for this between the 4.6 and 4.7-dev textpattern.js file, but the diff is to complex for me to figure out what exactly went wrong or is missing in the 4.7-dev version.

(*) turns out that is not easy to do… particularly in Firefox. You need to open the Developper tools, make sure the “Storage” tab is enabled (in the developper tools prefs), select that tab, select local storage, delete… In Safari there are two options: through the WebInspector, Storage tab or through Preferences > Privacy > Manage website data (but that deletes everything at once, cookies, local storage, cache). For Opera, open the developper tools and go to the Applications tab.

On first visit, Opera / Safari log the following error:

Uncaught ReferenceError: selectedTab is not defined
    at Object.fn (textpattern.js:1883)
    at Object.<anonymous> (textpattern.js:873)
    at Function.each (jquery.js:2)
    at Object.init (textpattern.js:870)
    at HTMLDocument.<anonymous> (textpattern.js:2021)
    at j (jquery.js:2)
    at k (jquery.js:2)

Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#4 2016-12-21 07:34:36

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Preferences Panel not displaying as tabs (TXP 4.7dev)

Thanks for the detailed report and sleuthing. Seems as if the lack of initialised variable is causing issues. We’ll (Oleg??) will look into it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2016-12-21 07:51:01

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: Preferences Panel not displaying as tabs (TXP 4.7dev)

I’ve opened an issue at Github for this.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#6 2016-12-22 22:23:58

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Preferences Panel not displaying as tabs (TXP 4.7dev)

Confirmed and (presumably) fixed. My bad, thanks for the report.

Offline

#7 2016-12-23 00:12:43

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: Preferences Panel not displaying as tabs (TXP 4.7dev)

etc wrote #303384:

Confirmed and (presumably) fixed. My bad, thanks for the report.

After clearing caches and the local storage entry, and hard reloading a panel to make sure textpattern.js is up-to-date: Yup works fine, at least in Safari 10.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#8 2016-12-23 11:33:29

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: Preferences Panel not displaying as tabs (TXP 4.7dev)

Fine, then can we close the issue?

Offline

#9 2016-12-23 12:40:29

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: Preferences Panel not displaying as tabs (TXP 4.7dev)

etc wrote #303391:

Fine, then can we close the issue?

Closed the issue. Thanks.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB