Jump to content

Template Expression causing Emoticon Loading Error


asigno

Recommended Posts

Posted

Hi,

I'm using an expression to put the members group Id into a JS variable, which is causing an issue with emoticons from loading.

I've tried pushing the value to the console rather than as a variable and I've also tried renaming the variable as well and the issue still exists, so I feel that it's the actual PHP expression which is causing the issue.

<script>
   var groupId = {expression="\IPS\Member::loggedIn()->member_group_id"};
</script>

This is the error in the console:

Uncaught TypeError: Cannot read property 'length' of undefined
    at baseController._buildEmoji (root_framework.js.1b5af06ae17ee2cabc48118aba3e1865.js.gz:951)
    at baseController.<anonymous> (root_framework.js.1b5af06ae17ee2cabc48118aba3e1865.js.gz:947)

The site is : https://yamahaclub.com/forums/

Any ideas would be most helpful.

Cheers

Posted

Hi @bfarber sorry for late repsonse I forgot to tick notifiy me of replies.

Yes if I remove that line code the smilies work fine and I don't get any console errors. I've even created a new default theme and still get the same issue.

Posted

@bfarber Yeah the code is working fine, this is what is rendered

<script>
var groupId = 4;
</script>
              

I thought at first it was just a conflict with the variable name, but on renaming it's the same issue.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...