Message Boards

Liferay Theme Migration from 7.0 to 7.3 (AMD Loader Issue)

thumbnail
Hamidul Islam, modified 2 Years ago.

Liferay Theme Migration from 7.0 to 7.3 (AMD Loader Issue)

Regular Member Posts: 111 Join Date: 5/22/08 Recent Posts

Hi,

I have a theme in Liferay 7.0 where react components are defined by AMD Loader. When the theme is migrated to Liferay 7.3 the AMD Loader doesn't work at all. Below is the script that works well in Liferay 7.0, but it throws exceptions in Liferay 7.3

<script>
  Liferay.Loader.require([
    'some-responsive-theme/js/dashboard.es',
  ], function ( Dashboard ) {
    Dashboard.dashboardTabs();
  });
</script>

Can anyone please help me on this?

Thanks & Regards,

Hamidul Islam 

thumbnail
Olaf Kock, modified 2 Years ago.

RE: Liferay Theme Migration from 7.0 to 7.3 (AMD Loader Issue)

Liferay Legend Posts: 6396 Join Date: 9/23/08 Recent Posts

7.0 was released in 2016, 7.3 in 2020. 4 years in the frontend world are enough time to bring up more variants than a virus commonly handled in the news.

My personal strategy for migrating Themes (when I got my hands dirty on them) - and especially through multiple versions (you're jumping 3 releases up) - was to rather start from scratch. On the positive side, you can easily copy some blocks, and come up with some new and better CSS.

For 7.3, you could also check if it's enough to just use a Stylebook and go without a theme at all. That will depend on the level of complexity of your theme, but it's definitely worth evaluating.