[Silk UI Web] Uncaught TypeError: Cannot read property 'getAttribute' of null

[Silk UI Web] Uncaught TypeError: Cannot read property 'getAttribute' of null

  
Forge Component
(47)
Published on 11 Nov (4 weeks ago) by OutSystems Labs
47 votes
Published on 11 Nov (4 weeks ago) by OutSystems Labs
Hi,

we get an error in the function detectDevice().
Besides we don;t know why it's occuring, we sure like to see a better exception-handling for it.



Hello Joost,

Can you please provide more details on how to replicate your issue?
Also, can you please specify which version of Silk UI Framework you have installed on your server ? 

Best Regards,
Samuel Jesus
I PM'd you.

we are using currently 1.1.0.
by accident we upgraded 1 server to the latest silkUI and buttons and links stopped working alltogether, so that's a bridge we are have to cross soon.

Solution
Hello Joost,
 
After taking a look at all the information you shared (both here and on the PM) we noticed that you have a custom layout that does not follow the Silk UI Layout rules.
Every Silk UI Layout needs to have a container with the class "Page" enclosing the layout, and that class needs to use a specific function(see image bellow).

 
Can you add that container and test your app again?
 
Best Regards,
Samuel Jesus
Solution