Toggle Widescreen: ReferenceError: assignment to undeclared variable article_id (after updating to strict-mode js)

I’ve only tried on one machine, but have replicated this on two browsers.

Describe the problem you’re having:

Javascript error on trying to Actions > Toggle widescreen mode:

If possible include steps to reproduce the problem:

Updated to latest using git because of Strict mode javascript in tt-rss - #9 by fox.

Widescreen mode had defaulted back to list:top/body: bottom - wanted them back to left/right.

Got the following message box on selecting it:

image

Javascript console:

setCookie: ttrss_ci_width => 0: false
reader:178:1
setCookie: ttrss_ci_height => 0: false
reader:178:1
ReferenceError: assignment to undeclared variable article_id
Stack trace:
switchPanelMode@https://example.com/reader/:149:65
quickMenuGo@https://example.com/reader/:113:362
anonymous@https://example.com/reader/lib/dojo/tt-rss-layer.js?1489592003 line 8 > Function:3:1
onItemClick@https://example.com/reader/lib/dojo/tt-rss-layer.js?1489592003:8:296801
postCreate/<@https://example.com/reader/lib/dojo/tt-rss-layer.js?1489592003:8:294292
dojo/on/</on.selector/</<@https://example.com/reader/lib/dojo/dojo.js?1489592003:8:53134
reader:159:110
ReferenceError: assignment to undeclared variable article_id
[Learn More]
reader:149:65
{"message":"HOST_ERROR_LOGGED"}

Line 149 seems to lead to:

function switchPanelMode(wide){if(isCdmMode())return;article_id=getActiveArticleId();if(wide){dijit.byId("headlines-wrap-inner").attr("design",'sidebar');dijit.byId("content-insert").attr("region","trailing");dijit.byId("content-insert").domNode.setStyle({width:'50%',height:'auto',borderTopWidth:'0px'});if(parseInt(getCookie("ttrss_ci_width"))>0){dijit.byId("content-insert").domNode.setStyle({width:getCookie("ttrss_ci_width")+"px"});}

Nothing of relevance found in error.log.

Behaviour happens in both normal and incognito mode on Firefox 58 and Chrome 64.

tt-rss version (including git commit id):

-bash-4.1$ git rev-parse --verify HEAD
0a8cdd4b9c320e4dcc74507b672b1fd10b59b677

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:

-bash-4.1$ uname -a
Linux example.com 2.6.32-042stab127.2 #1 SMP Thu Jan 4 16:41:44 MSK 2018 x86_64 x86_64 x86_64 GNU/Linux
-bash-4.1$ php --version
PHP 5.5.38 (cli) (built: Feb 18 2017 08:33:29) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
-bash-4.1$ mysql --version
mysql  Ver 14.14 Distrib 5.5.59, for Linux (x86_64) using readline 5.1

Please provide any additional information below:

I’ve tried

  • logging out
  • clearing cookies
  • using incognito mode
  • using a different browser

right, probably a few more of those are going to bubble up

https://git.tt-rss.org/fox/tt-rss/commit/7560e54e3925831f7a7347e0b53ed695c69ef7aa fix

Thanks a lot for fixing it so quickly @fox :+1: