Last Comment Bug 1339484 - Freemarker errors for Showfor section of many KB articles
: Freemarker errors for Showfor section of many KB articles
Status: RESOLVED FIXED
[1st2weeks]
:
Product: support.mozilla.org - Lithium
Classification: Other
Component: Knowledge Base Content (show other bugs)
: unspecified
: Unspecified Unspecified
-- normal
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-14 08:57 PST by guigs [guigs] PST (please needinfo me!)
Modified: 2017-03-05 10:04 PST (History)
8 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
showforbug.png (1.36 MB, image/png)
2017-02-14 08:57 PST, guigs [guigs] PST (please needinfo me!)
no flags Details
Bug1339484showforError-normaluser.png (203.87 KB, image/png)
2017-02-15 11:33 PST, Alice Wyman
no flags Details
FreeMarkerError-EscalationGuidelines.png (290.77 KB, image/png)
2017-02-17 00:55 PST, Alice Wyman
no flags Details
ArchiveLocations.png (25.95 KB, image/png)
2017-02-17 00:56 PST, Alice Wyman
no flags Details
FreeMarkerError-UnpublishedRevisions.png (215.93 KB, image/png)
2017-02-18 06:09 PST, Alice Wyman
no flags Details
FreeMarkerError-ContributorResources.png (30.13 KB, image/png)
2017-02-20 10:12 PST, Alice Wyman
no flags Details

Description User image guigs [guigs] PST (please needinfo me!) 2017-02-14 08:57:21 PST
Created attachment 8837201 [details]
showforbug.png

https://support.mozilla.org/t5/Documents-Archive/Answering-questions-on-the-Support-Forum/ta-p/1949

As an Admin, this page shows errors in the right hand column, where the show for items are normally shown. (See showforbug.png attached)

So far, it is just that article, titled "Answering Questions in the Support Forum", in the Contributor Knowledge Base TKB under the Contributor Resources Category.
Comment 1 User image Alice Wyman 2017-02-14 09:36:28 PST
I also see those showfor errors in other Documents Archive articles, such as https://support.mozilla.org/t5/Documents-Archive/How-do-I-create-a-screenshot-of-my-problem/ta-p/7064
I posted more information in that article's Comments section earlier today. 

That article shouldn't be in the Documents archive, by the way, since it's a "How to"  article to help users create a screenshot to post to their support question. Related discussion: https://support.mozilla.org/t5/Knowledge-Base-L10n-Discussions/quot-Create-a-screenshot-quot-article-draft-needs-review/m-p/1362337#U1362337
Comment 2 User image Alice Wyman 2017-02-14 09:40:35 PST
I looked through https://support.mozilla.org/t5/Documents-Archive/tkb-p/documents-archive and so far, all of the articles I checked show a FreeMarker template error.
Comment 3 User image Roland Tanglao :rolandtanglao, :mohnkuchen, :adobo, :sinigang, :roland 2017-02-14 09:43:39 PST
needinfo'ing tyson and scott

Tyson and Scott could one of you or the other fine lithium folks fix this please?
Comment 4 User image Alice Wyman 2017-02-15 09:48:23 PST
Another example was posted today in IRC #sumo:

https://support.mozilla.org/t5/Bookmarks-and-Tabs/How-do-I-restore-my-tabs-from-last-time/ta-p/4158
Comment 5 User image Alice Wyman 2017-02-15 09:57:25 PST
I looked through https://support.mozilla.org/t5/Bookmarks-and-Tabs/tkb-p/Bookmarks-Tabs-fireFox and all of the articles I checked show a FreeMarker template error.
Comment 6 User image Alice Wyman 2017-02-15 11:33:30 PST
Created attachment 8837736 [details]
Bug1339484showforError-normaluser.png

Here is a screenshot of the error when I'm not signed in or when I'm signed in with a "New Contributor" profile.  Notice that the "Create a screenshot on Windows" section is not displayed, even though I'm on Windows 7.
Comment 7 User image guigs [guigs] PST (please needinfo me!) 2017-02-16 16:24:40 PST
https://support.mozilla.org/t5/How-To/Page-Info-window/ta-p/15132 Another one flagged in abuse reports.
Comment 8 User image Alice Wyman 2017-02-16 23:31:33 PST
(In reply to rmcguigan from comment #7)
> https://support.mozilla.org/t5/How-To/Page-Info-window/ta-p/15132 Another
> one flagged in abuse reports.

Did you mean to post this to another bug?
Comment 9 User image Alice Wyman 2017-02-16 23:41:29 PST
(from comment #8)
> (In reply to rmcguigan from comment #7)
> > https://support.mozilla.org/t5/How-To/Page-Info-window/ta-p/15132 Another
> > one flagged in abuse reports.
> 
> Did you mean to post this to another bug?

Sorry, I see that the above page shows a FreeMarker template error.  So do all articles in the "How to" and "Troubleshooting" archives containing redirects for renamed articles:
https://support.mozilla.org/t5/How-To/tkb-p/how-to-archive
https://support.mozilla.org/t5/How-To/tkb-p/troubleshooting-archive
Comment 10 User image Alice Wyman 2017-02-17 00:55:13 PST
Created attachment 8838439 [details]
FreeMarkerError-EscalationGuidelines.png

I was looking through the How To archive and noticed Escalation Guidelines (a "How to Contribute" article).  Like other articles in an archive location, this one showed the FreeMarker error.  As a test, I moved the article back to the Contributors KB where it was originally, and the error is gone: 
https://support.mozilla.org/t5/Contributor-Knowledge-Base/Escalation-Guidelines/tac-p/1363973

So, it looks like these errors are the result of moving KB articles to the various archive locations.
Comment 11 User image Alice Wyman 2017-02-17 00:56:46 PST
Created attachment 8838440 [details]
ArchiveLocations.png
Comment 12 User image Alice Wyman 2017-02-18 06:09:04 PST
Created attachment 8838849 [details]
FreeMarkerError-UnpublishedRevisions.png

(from comment #1)
> https://support.mozilla.org/t5/Documents-Archive/How-do-I-create-a-screenshot-of-my-problem/ta-p/7064
I moved that article out of the archived location. I no longer see the error in the new location.

By the way, the FreeMarker template error isn't limited to articles in archived locations.  I also see it when selecting one of the unpublished revisions in the KB article dashboard at https://support.mozilla.org/t5/tkb/dashboardpage/category-id/Mozilla-EN
Comment 14 User image scott.riley 2017-02-21 11:52:35 PST
Please check the JSON object for those nodes.  For example, the one here https://support.mozilla.org/t5/bizapps/bizappspage/tab/community%3Aadmin%3Asystem%3Asettings-list-editor/node-display-id/tkb-board%3Affandroid_template is not valid which will cause the widget to display an error.

Testing via http://jsonlint.com/
Comment 15 User image Roland Tanglao :rolandtanglao, :mohnkuchen, :adobo, :sinigang, :roland 2017-03-02 08:52:17 PST
scott you right ! 

somehow (copy and paste error?):

<code>
"visible": true
</code>

was changed to

<code>
"visible": !0
</code>

which is very weird
Comment 16 User image Roland Tanglao :rolandtanglao, :mohnkuchen, :adobo, :sinigang, :roland 2017-03-02 22:00:39 PST
Got it to work EXCEPT for the unpublished revisions dashboard in comment 12 using the showfor.json here:
https://raw.githubusercontent.com/rtanglao/rt-showfor.json/master/showfor.json

Full details on how I made this showfor.json:
https://github.com/rtanglao/rt-showfor.json#march-2-2017

Scott, Joni, Madalina please tell me where the showfor.json is for "unpublished revisions in the KB article dashboard" at https://support.mozilla.org/t5/tkb/dashboardpage/category-id/Mozilla-EN and then I will fix comment 12 too!
Comment 17 User image Roland Tanglao :rolandtanglao, :mohnkuchen, :adobo, :sinigang, :roland 2017-03-03 12:37:01 PST
fixed, forgot Mozilla Support Community :: Mozilla Support - English, thanks to Joni for her help!

Note You need to log in before you can comment on or make changes to this bug.