Web Pages - Home Tab

Anything about what happens on the user and teacher side
marius
FormaLms User
Posts: 74
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Web Pages - Home Tab

Post by marius »

Good day.
I've created a custom page with links to other content within the LMS. This page is also set as the default page and is published.
In the User Area in LMS, the Home tab is also activated and set as the default. However when a user logs in, The Home Tab is selected but no content is displayed under it. Am I missing another setting somewhere?
thx
alfa24
Senior Boarder
Posts: 1982
Joined: Fri Nov 24, 2017 8:45 am

Re: Web Pages - Home Tab

Post by alfa24 »

can't replicate... I see the content correctly.
Can you upload a screenshot with evidence of the inspector window?
Per supporto GRATUITO contattatemi in privato qui
marius
FormaLms User
Posts: 74
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

Please see the screenshots attached. Note that this is a client's system running on Google Cloud. The inspector_thunderbird.png also shows that the div "tab_content" is empty and does not contain anything...

We're running version 2.0 and have not updated as it's a live system that the client uses.
alfa24
Senior Boarder
Posts: 1982
Joined: Fri Nov 24, 2017 8:45 am

Re: Web Pages - Home Tab

Post by alfa24 »

Nothing is attached.
Anyway, I tested on a 2.2.1, I haven't a 2.0 to try.
Per supporto GRATUITO contattatemi in privato qui
marius
FormaLms User
Posts: 74
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

I've also found the following error in the browser console mode:

SyntaxError: '' string literal contains an unescaped line break index.php:389:186

When viewing the page source through the debugger it references the following block of code - clearly a javascript block pulling the content for the relevant "default page". I just took out the html table content for easier reading

<script type="text/javascript">
document.getElementById('tab_content').innerHTML = '<div id=\"tabhome_title\"><h1>Dashboard</h1></div><div id=\"tabhome_description\"><h1 style=\"text-align: center;\">Dashboard</h1>
<br /><br />
<p>this is normal</p>
<table style=\"height: 342px; width: 75%; border-collapse: collapse; margin-left: auto; margin-right: auto;\" border=\"0\">
<tbody>
.....
</tbody>
</table></div>';
</script>
Attachments
Inspector_thunderbird.png
UserArea.png
WebPages.png
marius
FormaLms User
Posts: 74
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

I've removed all content and just replaced it with one line of text, and it now seems to work.
I'll keep on adding content to see what html component within tiny_MCE breaks the formatting - seems to insert a line break or single quote ' somewhere that breaks the script
alfa24
Senior Boarder
Posts: 1982
Joined: Fri Nov 24, 2017 8:45 am

Re: Web Pages - Home Tab

Post by alfa24 »

Please, provide the line 360 of index.php as the browser renders it.
Per supporto GRATUITO contattatemi in privato qui
marius
FormaLms User
Posts: 74
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

What I notice is that any unformatted text renders fine, but as soon as any style elements are used it causes syntax error within the script.
This is from 355 - 386:

<div id="inline_no_help" >
No Help Desk

</div>

</div>




<!-- content -->
<div class="row">
<div class="container-fluid">
<!-- welcome page (main tab) -->
<div id="yui-main">
<div class="yui-a">
<div>
<div id="middlearea" class="yui-navset">


<div class="tabs-wrapper">
<ul class="nav nav-tabs hidden-xs slider-menu slider-menu--tabs">
<li ><a href="/forums.html?r=lms/elearning/show&sop=unregistercourse"><em>E-learning</em></a></li><li class="active" ><a href="/forums.html?r=lms/home/show&sop=unregistercourse"><em>Dashboard</em></a></li> </ul>
</div>


</div>
</div>
</div> </div>
</div>
<div id="tab_content"></div>
</div>
marius
FormaLms User
Posts: 74
Joined: Wed Oct 05, 2016 3:59 am
Version: forma.lms 1.4.2

Re: Web Pages - Home Tab

Post by marius »

This script is currently causing the syntax error:

<script type="text/javascript">
document.getElementById('tab_content').innerHTML = '<div id=\"tabhome_title\"><h1>Dashboard</h1></div><div id=\"tabhome_description\"><h1>DASHBOARD</h1>
<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019</div>';
</script>

As soon as styling elements are removed it renders fine
alfa24
Senior Boarder
Posts: 1982
Joined: Fri Nov 24, 2017 8:45 am

Re: Web Pages - Home Tab

Post by alfa24 »

marius wrote: Fri Nov 08, 2019 11:12 am This script is currently causing the syntax error:

<script type="text/javascript">
document.getElementById('tab_content').innerHTML = '<div id=\"tabhome_title\"><h1>Dashboard</h1></div><div id=\"tabhome_description\"><h1>DASHBOARD</h1>
<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019</div>';
</script>

As soon as styling elements are removed it renders fine
I don't see styling elements within this code.
Per supporto GRATUITO contattatemi in privato qui
Post Reply