This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 14 - Pages: 1 - Last Post: 21-Aug-2018 16:26 Last Post By: AnCa
AndreWolff

Posts: 1,746
Registered: 14-Dec-2007
Doubled widgets
Posted: 03-Aug-2018 09:10
 
  Click to reply to this thread Reply
The widget bat at the bottom of the album shows all field twice, see this FancyBox sample album and attached screenshot.

I see just one widget block:
<div id="jalbumwidgetcontainer"></div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
_jaSkin = "FancyBox";
_jaStyle = "Black.css";
_jaVersion = "16.1.2";
_jaGeneratorType = "desktop";
_jaLanguage = "en";
_jaPageType = "index";
_jaRootPath = ".";
_jaUserId = "107704";
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http"+("https:"==document.location.protocol?"s":"")+"://jalbum.net/widgetapi/load.js";
document.getElementById("jalbumwidgetcontainer").appendChild(script);
//--><!]]></script>

This block is almost identical to the block I see in the corresponding PhotoSwipe sample album which shows the fields only once as expected.

How can I prevent the doubled fields?
RobM

Posts: 3,102
Registered: 4-Aug-2006
Re: Doubled widgets
Posted: 03-Aug-2018 13:45   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
I see only one widget bar, try a different browser or clear your cache
AndreWolff

Posts: 1,746
Registered: 14-Dec-2007
Re: Doubled widgets
Posted: 03-Aug-2018 15:09   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
I see only one widget bar, try a different browser or clear your cache
Did click on the 2nd link instead of on the first link?

I see both on my PC and on my iPad double widget bars.

I don’t think that can be caused by the cache, but I see still double widgets after I emptied the cache.
RobM

Posts: 3,102
Registered: 4-Aug-2006
Re: Doubled widgets
Posted: 03-Aug-2018 17:36   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
RobM wrote:
I see only one widget bar, try a different browser or clear your cache
Did click on the 2nd link instead of on the first link?

I see both on my PC and on my iPad double widget bars.

I don’t think that can be caused by the cache, but I see still double widgets after I emptied the cache.

Sorry, just glanced at the page as I was on my way out, I thought you meant double widget bar but now I see you mean one widget bar with double entries for about, counter etc.
RobM

Posts: 3,102
Registered: 4-Aug-2006
Re: Doubled widgets
Posted: 03-Aug-2018 20:23   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
For some reason the LoadWidgets.Action script has invoked
            _jacommenting = _ja_W.create("div");
            _jacommentingTab = _ja_W.create("li");
            _jacommentingDisplayName = "Comments";
 
            
                _ja_W.addToWidgetBar("jalbum-commenting", _jacommentingTab, "jalbum-commentingtab", "commenting", "Comments", "//jalbum.net/widgetapi/comment/CommentList.action");
                _ja_W.addPageLoadScript("//jalbum.net/widgetapi/comment/CommentCount.action");
                _jaReloadActions.push("//jalbum.net/widgetapi/comment/CommentReload.action");
            
            _ja_W.addWidget(_jacommenting, "jalbum-commenting");
 
            if ("jalbum-commenting" == _jaCurrentId) {
                _ja_W.selectEnabledWidget("jalbum-commenting", "//jalbum.net/widgetapi/comment/CommentList.action");
            }
            
            _japageviewcounter = _ja_W.create("div");
            _japageviewcounterTab = _ja_W.create("li");
            _japageviewcounterDisplayName = "Visits";
 
            
                _ja_W.addToWidgetBar("jalbum-pageviewcounter", _japageviewcounterTab, "jalbum-pageviewcountertab", "pageviewcounter", "Visits", "//jalbum.net/widgetapi/counter/CounterDetailedView.action");
                _ja_W.addPageLoadScript("//jalbum.net/widgetapi/counter/CounterView.action");
                _jaReloadActions.push("null");
            
            _ja_W.addWidget(_japageviewcounter, "jalbum-pageviewcounter");
 
            if ("jalbum-pageviewcounter" == _jaCurrentId) {
                _ja_W.selectEnabledWidget("jalbum-pageviewcounter", "//jalbum.net/widgetapi/counter/CounterDetailedView.action");
            }
            
            _jashare = _ja_W.create("div");
            _jashareTab = _ja_W.create("li");
            _jashareDisplayName = "Share";
 
            
                _ja_W.addToWidgetBar("jalbum-share", _jashareTab, "jalbum-sharetab", "share", "Share", "//jalbum.net/widgetapi/share/Share.action");
                _ja_W.addPageLoadScript("null");
                _jaReloadActions.push("null");
            
            _ja_W.addWidget(_jashare, "jalbum-share");
 
            if ("jalbum-share" == _jaCurrentId) {
                _ja_W.selectEnabledWidget("jalbum-share", "//jalbum.net/widgetapi/share/Share.action");
            }
twice.

The full content is

 
 
 
 
 
 
 
 
/* no-banner no-sponsor */
 
 
var _ja_W = {
    LoadBar: function() {
        _ja_W.hide(_jaWidgetContainer);
 
        _jaAlbumKey = "andrewolff.jalbum.net:80/fb_justifiedgallery/";
        _jaPageKey = "andrewolff.jalbum.net:80/fb_justifiedgallery/";
        _jaPageType = "index";
        _jaOwnerUserName = "AndreWolff";
        _jaViewerIsProbableOwner = false;
        _jaMediaRssUrl = "https://andrewolff.jalbum.net/FB_JustifiedGallery/album.rss";
        _jaWidgetFocus = false;
        _jaLoading = true;
        _jaDisplayWidgets = true;
        _jaCurrentId = _ja_W.preselected();
        _jaWidgetBarContainer = null;
        _jaWidgetBar = null;
        _jaWidgetHandleLink = null;
        _jaMinimizeContainer = null;
        _jaCurrentFolder = '';
        _jaShowAds = false;
        _jaReloadActions = new Array();
        _jaCurrentHash = location.hash;
        _ja_W.interceptHashchange();
        _jaCountryCode = "US";
 
        
            _jaSponsorLink = null;
        
 
        
            _ja_W.setupStyles();
 
            _ja_W.widgetHead();
            
            
            _jacommenting = _ja_W.create("div");
            _jacommentingTab = _ja_W.create("li");
            _jacommentingDisplayName = "Comments";
 
            
                _ja_W.addToWidgetBar("jalbum-commenting", _jacommentingTab, "jalbum-commentingtab", "commenting", "Comments", "//jalbum.net/widgetapi/comment/CommentList.action");
                _ja_W.addPageLoadScript("//jalbum.net/widgetapi/comment/CommentCount.action");
                _jaReloadActions.push("//jalbum.net/widgetapi/comment/CommentReload.action");
            
            _ja_W.addWidget(_jacommenting, "jalbum-commenting");
 
            if ("jalbum-commenting" == _jaCurrentId) {
                _ja_W.selectEnabledWidget("jalbum-commenting", "//jalbum.net/widgetapi/comment/CommentList.action");
            }
            
            _japageviewcounter = _ja_W.create("div");
            _japageviewcounterTab = _ja_W.create("li");
            _japageviewcounterDisplayName = "Visits";
 
            
                _ja_W.addToWidgetBar("jalbum-pageviewcounter", _japageviewcounterTab, "jalbum-pageviewcountertab", "pageviewcounter", "Visits", "//jalbum.net/widgetapi/counter/CounterDetailedView.action");
                _ja_W.addPageLoadScript("//jalbum.net/widgetapi/counter/CounterView.action");
                _jaReloadActions.push("null");
            
            _ja_W.addWidget(_japageviewcounter, "jalbum-pageviewcounter");
 
            if ("jalbum-pageviewcounter" == _jaCurrentId) {
                _ja_W.selectEnabledWidget("jalbum-pageviewcounter", "//jalbum.net/widgetapi/counter/CounterDetailedView.action");
            }
            
            _jashare = _ja_W.create("div");
            _jashareTab = _ja_W.create("li");
            _jashareDisplayName = "Share";
 
            
                _ja_W.addToWidgetBar("jalbum-share", _jashareTab, "jalbum-sharetab", "share", "Share", "//jalbum.net/widgetapi/share/Share.action");
                _ja_W.addPageLoadScript("null");
                _jaReloadActions.push("null");
            
            _ja_W.addWidget(_jashare, "jalbum-share");
 
            if ("jalbum-share" == _jaCurrentId) {
                _ja_W.selectEnabledWidget("jalbum-share", "//jalbum.net/widgetapi/share/Share.action");
            }
            
            _jacommenting = _ja_W.create("div");
            _jacommentingTab = _ja_W.create("li");
            _jacommentingDisplayName = "Comments";
 
            
                _ja_W.addToWidgetBar("jalbum-commenting", _jacommentingTab, "jalbum-commentingtab", "commenting", "Comments", "//jalbum.net/widgetapi/comment/CommentList.action");
                _ja_W.addPageLoadScript("//jalbum.net/widgetapi/comment/CommentCount.action");
                _jaReloadActions.push("//jalbum.net/widgetapi/comment/CommentReload.action");
            
            _ja_W.addWidget(_jacommenting, "jalbum-commenting");
 
            if ("jalbum-commenting" == _jaCurrentId) {
                _ja_W.selectEnabledWidget("jalbum-commenting", "//jalbum.net/widgetapi/comment/CommentList.action");
            }
            
            _japageviewcounter = _ja_W.create("div");
            _japageviewcounterTab = _ja_W.create("li");
            _japageviewcounterDisplayName = "Visits";
 
            
                _ja_W.addToWidgetBar("jalbum-pageviewcounter", _japageviewcounterTab, "jalbum-pageviewcountertab", "pageviewcounter", "Visits", "//jalbum.net/widgetapi/counter/CounterDetailedView.action");
                _ja_W.addPageLoadScript("//jalbum.net/widgetapi/counter/CounterView.action");
                _jaReloadActions.push("null");
            
            _ja_W.addWidget(_japageviewcounter, "jalbum-pageviewcounter");
 
            if ("jalbum-pageviewcounter" == _jaCurrentId) {
                _ja_W.selectEnabledWidget("jalbum-pageviewcounter", "//jalbum.net/widgetapi/counter/CounterDetailedView.action");
            }
            
            _jashare = _ja_W.create("div");
            _jashareTab = _ja_W.create("li");
            _jashareDisplayName = "Share";
 
            
                _ja_W.addToWidgetBar("jalbum-share", _jashareTab, "jalbum-sharetab", "share", "Share", "//jalbum.net/widgetapi/share/Share.action");
                _ja_W.addPageLoadScript("null");
                _jaReloadActions.push("null");
            
            _ja_W.addWidget(_jashare, "jalbum-share");
 
            if ("jalbum-share" == _jaCurrentId) {
                _ja_W.selectEnabledWidget("jalbum-share", "//jalbum.net/widgetapi/share/Share.action");
            }
            
 
            if (typeof _jaWidgetStyle != "undefined") _ja_W.addStyle(_jaWidgetStyle, true);
            _ja_W.add(_ja_W.script(_jaHost + "load/Finally.action"));
            _jaLoading = false;
            if (_ja_W.cookie("_jaHideWidgets") == "true" || window.innerWidth <= 650) {
                _ja_W.hideWidgets(true);
            } else {
                _ja_W.showWidgets(true);
            }
        
        
        if (_jaCurrentHash !== '') {
            delayedVibrantAdReload();
        }
    }
}
 
_ja_W.interceptHashchange = function() {
    window.addEventListener('hashchange', _ja_W.hashChanged, false);
 
    (function(history){
        var pushState = history.pushState;
        history.pushState = function(state) {
            var r = pushState.apply(history, arguments);
            _ja_W.hashChanged();
            return r;
        };
    })(window.history);
}
 
_ja_W.hashChanged = function() {
    _ja_W.Reload();
    delayedVibrantAdReload();
}
 
_ja_W.ReloadBar = function() {
}
 
_ja_W.Reload = function() {
 
    _jaCurrentHash = location.hash;
 
    var newPageKey = _jaPageKey;
    var hashIndex = newPageKey.indexOf('#');
    if (hashIndex > 0) {
        newPageKey = newPageKey.substring(0, hashIndex);
    }
 
    newPageKey += _jaCurrentHash.toLowerCase();
    _jaPageKey = newPageKey;
    for (var i = 0; i < _jaReloadActions.length; i++) {
        _ja_W.addPageLoadScript(_jaReloadActions[i]);
    }
}
 
var _jaWidgetsLoadScript = document.createElement("script");
    _jaWidgetsLoadScript.type = "text/javascript";
    _jaWidgetsLoadScript.src = _jaHost + "LoadJS.jsp?lut=1520010181000";
    _jaWidgetsLoadScript.charset = "utf-8";
    _jaWidgetContainer.appendChild(_jaWidgetsLoadScript);
RobM

Posts: 3,102
Registered: 4-Aug-2006
Re: Doubled widgets
Posted: 03-Aug-2018 20:30   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
By the way, both albums are using HTTPS but serving audio from HTTP
 <audio  controls loop controlsList="nodownload"
        src="http://www.andrewolff.nl/muziek/08_Sheep_May_Safely_Graze_Thijs_van_Leer.mp3" >	
       </audio>
</div>
AndreWolff

Posts: 1,746
Registered: 14-Dec-2007
Re: Doubled widgets
Posted: 04-Aug-2018 12:35   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
For some reason the LoadWidgets.Action script has invoked code _jacommenting = _ja_W.create("div");
Sorry, I have no idea what you mean by this and how I can prevent that!

BTW the css validator gives a warning:

Warning: The type attribute is unnecessary for JavaScript resources.

From line 556, column 1; to line 556, column 31

r">
↩<script type="text/javascript"><!--//
AndreWolff

Posts: 1,746
Registered: 14-Dec-2007
Re: Doubled widgets
Posted: 04-Aug-2018 12:49   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
By the way, both albums are using HTTPS but serving audio from HTTP
Thanks for reporting this.
It has now been corrected, but it does not solve the widget problem.
RobM

Posts: 3,102
Registered: 4-Aug-2006
Re: Doubled widgets
Posted: 04-Aug-2018 22:12   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
The problem would appear to be related to your skin code.
Only your FancyBox skin, and its 'Sample albums' page, which appears to be made with Photoswipe, have this problem. A sample album made with default settings of FancyBox 1.2.1 works correctly, your albums are using an unreleased 1.2.2 version.
AndreWolff

Posts: 1,746
Registered: 14-Dec-2007
Re: Doubled widgets
Posted: 04-Aug-2018 22:57   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
The problem would appear to be related to your skin code.
Only your FancyBox skin, and its 'Sample albums' page, which appears to be made with Photoswipe, have this problem. A sample album made with default settings of FancyBox 1.2.1 works correctly, your albums are using an unreleased 1.2.2 version.
No, version 1.2.1 shows the same problem, see this album which I just made with te released version 1.2.1

And you are correct the top sample album of FancyBox is an album of albums made by PhotoSwipe and it shows the same doubled widget, but if I use the same PhotoSwipe version to make a normal PhotoSwipe album, I see a normal single widget!

The link with wigets is in all my skins identical:
<ja:if test="<%= useWidgets %>">
<ja:widget pageType="index" />
</ja:if>

so why is the widget code so sensitive to the name FancyBox?
RobM

Posts: 3,102
Registered: 4-Aug-2006
Re: Doubled widgets
Posted: 05-Aug-2018 00:12   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
I don't see the problem using the Sample Portfolio project and the skin's default settings, does that work for you too?

If it does then try using the same settings as before, does it still work? If yes then what is different between that project and your others?
AndreWolff

Posts: 1,746
Registered: 14-Dec-2007
Re: Doubled widgets
Posted: 05-Aug-2018 09:45   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
I don't see the problem using the Sample Portfolio project and the skin's default settings, does that work for you too?
I don't see the problem either if I make the Sample portfolio album and open it directly as you can see here.
If it does then try using the same settings as before, does it still work? If yes then what is different between that project and your others?
I will investigate that in detail later.

Edit:

I did 2 other experiments:

This problem album on the jAlbum server shows double widgets fields, but if I upload the same album to my Strato server you see single widget fields.

Next I saved the project file under a new name, changed the output directory and imported the settings of the Portfolio (which did show a correct widget bar). I made the album and a correct widget bar was displayed. Next I imported the settings of the problem album and made the album again. This album did show also the correct widget bar as you can see here.

So I still can't say what exactly doubles the widget bar, the only thing I can say it is caused by a problem with the jAlbum server.

Edited by: AndreWolff on 05-Aug-2018 13:56
RobM

Posts: 3,102
Registered: 4-Aug-2006
Re: Doubled widgets
Posted: 05-Aug-2018 16:22   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
This problem album on the jAlbum server shows double widgets fields…

Next I saved the project file under a new name, changed the output directory and imported the settings of the Portfolio (which did show a correct widget bar). I made the album and a correct widget bar was displayed. Next I imported the settings of the problem album and made the album again. This album did show also the correct widget bar as you can see here.

So I still can't say what exactly doubles the widget bar, the only thing I can say it is caused by a problem with the jAlbum server.

Since both of those albums are hosted on jAlbum.net yet one displays correctly and the other does not indicates to me a possible corrupt album.
It would seem the easiest fix is to delete FB_JustifiedGallery from your computer and the jAlbum server and rename FB_JustifiedGallery2 project to the original name (FB_JustifiedGallery) and upload that.
AndreWolff

Posts: 1,746
Registered: 14-Dec-2007
Re: Doubled widgets
Posted: 05-Aug-2018 19:15   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Since both of those albums are hosted on jAlbum.net yet one displays correctly and the other does not indicates to me a possible corrupt album.
No that is not true I think, because a lot of albums show double widgets and I don't think they are all corrupt.
It would seem the easiest fix is to delete FB_JustifiedGallery from your computer and the jAlbum server and rename FB_JustifiedGallery2 project to the original name (FB_JustifiedGallery) and upload that.
That solves the problem for just one album, but it is a fundamental problem.

Maybe it is related to other problems with my jAlbum page.

I hope Anders knows a solution.

Edit:

This is the recipe to repair the widget bar:

Delete the album by hand from the jAlbum server.
Do a Make All.
Upload the album.

Now you see again a normal widget bar as you can see here.

Edited by: AndreWolff on 06-Aug-2018 08:05
AnCa

Posts: 562
Registered: 25-Mar-2005
Re: Doubled widgets
Posted: 21-Aug-2018 16:26   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
I hope Anders knows a solution.
I don't have a solution yet, but the problem is that due to the https-method in the URL of the album, the server has added a non https-version to your profile. And those add one set of widgets each to the album... :(

I'll have to dig into the https issue....
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums