Language's "selected" does not work (v2021)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mobhar
User
Posts: 11703

Language's "selected" does not work (v2021)

Post by mobhar »

It seems the selected language property of language does not work. I've just tried with 3 languages (en, id, and ar), and here is the result from View Page Source of browser:

ew.vars = {"languages":{"languages":[{"id":"ar","desc":"ar","selected":false},{"id":"en","desc":"en","selected":false},{"id":"id","desc":"id","selected":false}]}

However, when I call CurrentLanguageID() global function, it works as expected. Only the "selected" property of the languages Javascript variable above does not work.

mobhar
User
Posts: 11703

Post by mobhar »

I think I've just found out the solution for this issue. Simply remove that code from toJson() function to inside the __construct() of Language class. Just put it right below this line:
// Call Language Load event
$this->languageLoad();

and now the issue has gone. It works as expected now.

Hope this helps.

Webmaster
User
Posts: 9427

Post by Webmaster »

Click Tools -> Update Template and try again.

mobhar
User
Posts: 11703

Post by mobhar »

Thanks. Now it works properly.

Post Reply