Bug 28319 - News under Tools not opening after adding HTML code in MainBlock
Summary: News under Tools not opening after adding HTML code in MainBlock
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 20.11
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-11 13:40 UTC by Sandeep Patel
Modified: 2021-12-13 21:10 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Code use in news under Mainblock. (3.92 KB, text/html)
2021-05-11 13:40 UTC, Sandeep Patel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sandeep Patel 2021-05-11 13:40:00 UTC
Created attachment 120842 [details]
Code use in news under Mainblock.

Dear Team,

Under Tools Section under news, I added the HTML code after which the news page is continuously refreshing with error in the intranet-error.log file. 

-----Error----
[Tue May 11 15:24:30.028112 2021] [cgi:error] [pid 197008] [client 103.67.188.42:59320] AH01215: [Tue May 11 15:24:30 2021] koha-news.pl: Use of uninitialized value $theme in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122.: /usr/share/koha/intranet/cgi-bin/tools/koha-news.pl, referer: http://161.97.161.103:4859/cgi-bin/koha/tools/koha-news.pl
[Tue May 11 15:24:30.029803 2021] [cgi:error] [pid 197008] [client 103.67.188.42:59320] AH01215: [Tue May 11 15:24:30 2021] koha-news.pl: Use of uninitialized value in string eq at /usr/share/koha/intranet/cgi-bin/tools/koha-news.pl line 85.: /usr/share/koha/intranet/cgi-bin/tools/koha-news.pl, referer: http://161.97.161.103:4859/cgi-bin/koha/tools/koha-news.pl
--------------

I have attached the HTML code file name code.html that I added in the New under MailBlock.
Comment 1 Owen Leonard 2021-05-11 15:33:40 UTC
The cause of the endless refreshing isn't in Koha, it's in your code. The line, "document.getElementById("defaultOpen").click();" seems to be to blame.
Comment 2 Sandeep Patel 2021-05-12 08:09:05 UTC
Dear Owen,

Thanks for Quick Response. 

Now I am not able to access the News Part, how can I remove the code?

Can I do it from the database, if yes which table the content will be. 

Regards,
Sandeep Patel
Comment 3 Sandeep Patel 2021-05-12 08:21:53 UTC
Dear Owen,

I found the html code under database table opac_news. After replacing the content the Issue Got resolved. 

Thanks Owen.

Regards,
Sandeep Patel