Picture of Ross Murray
Leaving blank 'Display title' for Tabs and Accordion components results in page not loading (
by Ross Murray - Wednesday, 27 April 2022, 10:10 AM
 

Hi,

I've come across a bug where if I leave the 'Display title' blank for accordion and tabs when I preview the page from the authoring tool the course does not load.

This is using 5.19.1 of Adapt with the Authoring tool. Both components are on the latest versions.

Other components work fine (That I've checked). I'm currently creating a theme for our first Adapt 5 project as we move from Adapt 4.

So to explain further;

  • Selecting preview, the courses main menu page will load fine.
  • Then select a page with a tabs or accordion and no display title.
  • The page begins to load but gets stuck in an endless loop (loading animation plays, with the courses nav bar visible, but the page content does not load.

Here is a little video showing what's happening https://www.loom.com/share/a8b8b69380794248960eb3029069a50f

Thanks for any help,

Ross

Picture of Ross Murray
Re: Leaving blank 'Display title' for Tabs and Accordion components results in page not loading (
by Ross Murray - Monday, 2 May 2022, 2:29 PM
 

Hi just checking in to see if anyone has any ideas on solutions for this?

Thanks

Ross

Picture of Ignacio Cinalli
Re: Leaving blank 'Display title' for Tabs and Accordion components results in page not loading (
by Ignacio Cinalli - Monday, 2 May 2022, 7:07 PM
 

Hi, Ross.

There seems to be an issue with the src/core/templates/header.jsx on line 4

I have posted an issue on Github.


If you have a custom theme, you can amend the header template.
Copy src/core/templates/header.jsx to src/theme/[your-theme-name]/templates/
And change line 4 to:

  import {html, prefixClasses, compile } from 'core/js/reactHelpers';

Picture of Ross Murray
Re: Leaving blank 'Display title' for Tabs and Accordion components results in page not loading (
by Ross Murray - Monday, 2 May 2022, 8:04 PM
 

Hi Ignacio, 

Thanks very much for looking at this and identifying the issue. I am working with a custom theme and will give that a go tomorrow.

Thanks!

Ross

Picture of Oliver Foster
Re: Leaving blank 'Display title' for Tabs and Accordion components results in page not loading (
by Oliver Foster - Tuesday, 3 May 2022, 9:40 AM
Picture of Ross Murray
Re: Leaving blank 'Display title' for Tabs and Accordion components results in page not loading (
by Ross Murray - Tuesday, 3 May 2022, 10:00 AM
 

Added this fix to my theme this morning, thanks for the solution :)

I'd been looking at a much less sophisticated solution of adding a class to my component settings to set the title to display none which sort of worked but this is much better.

Ross