Hello Guys i have a weird a question ,
lets say i have a node content picker and i assigned it to a specific node then i unpublished that node so my Content Picker Propriety Has An unpublished Node And my website keeps Throwing an exception dose anyone ran into similar issue ? the user is really naive and i need to handle it from my side any thoughts ?
Content Picker, Picked An Unpublished Node
Hello Guys i have a weird a question , lets say i have a node content picker and i assigned it to a specific node then i unpublished that node so my Content Picker Propriety Has An unpublished Node And my website keeps Throwing an exception dose anyone ran into similar issue ? the user is really naive and i need to handle it from my side any thoughts ?
Hi Ibrahim
Can you show your code?
You have to handle the situation when the content picker is containing unpublished node.
Thanks,
Alex
How to Do So ?
Check selected node for null.
Can you show how do you render the page and where do you have an exception?
Thanks,
Alex
The sectionNumber6 is a Content Picker
Try to use this code:
It worked Perfectly Thanks A lot
i have Put them In try catch Statement Do you think i should change them in sake if a better practice or what ?
The better way will be like that:
is working on a reply...