Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matthew Macias 2 posts 72 karma points
    Jun 24, 2016 @ 22:15
    Matthew Macias
    0

    Any suggestions? - Right Sidebar works but Full Width doesnt

    Hi,

    Completely new to this so I figured when in crisis this would be the best time to try out the forum....

    enter image description here

    Can anyone point me in the right direction?

    Also, the page will work if I set it to the Right Sidebar template but not the Full Width, which is what I need.

    Any suggestions?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 26, 2016 @ 06:08
    Jan Skovgaard
    1

    Hi Matthew and welcome to the Umbraco developer forum :)

    Apart from the line where the error happens can you then please also let us know what the error message is? Otherwise it's pretty hard for us to figure out what might be wrong in line 39 :)

    Also it might help to see the full code instead of just the snippet to get some context. For instance it's not clear whether the _localBannerNodeId variable has been declared somewhere for instance - Perhaps it's not a string and maybe that's the issue since you're trying to cast it as a string to check whether it's value is null or empty but perhaps it's really an integer?

    Looking forward to hearing from you.

    /Jan

  • Matthew Macias 2 posts 72 karma points
    Jun 27, 2016 @ 16:42
    Matthew Macias
    0

    Jan thank you for the tips!

    Below you will see the error message and the full code!

    Sorry - rookie mistake!

    enter image description here

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 28, 2016 @ 05:30
    Jan Skovgaard
    0

    Hi Matthew

    No need to be sorry :)

    Can you also please post the full source code that you're working on? I suspect that the error is caused by the fact that the _localBannerNodeId is not a string...

    What happens if you try writing the check like you do the _ancestorBannerNodeId? So the if condition looks like this

    if(_localBannerNodeId != null && _ancestorBannerNodeId != null)
    

    Try using this on line 39 in your code.

    If this does not solve anything then please post the full source code too and the new potential error message (if this also fails).

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft