rrd108 / krisnavolgy

0 stars 0 forks source link

InternalLink with no (NULL) relation to page, gives error 500 #59

Open thomashisgithub opened 1 year ago

thomashisgithub commented 1 year ago

Currently to generate the navigation bar we use the strapi component internalLink. This has a non mandatory relation with page. Strapi does not allow it to be mandatory by default. If it is left blank (NULL) it will result in null pointer errors and show up as error 500 on the front end.

Solution: Option a) Implement error handling in fronted Option b) create a lifecycle event "beforeCreate" in strapi and check if a page is linked, if not don't create and give error message to user in strapi.

Both are nice to implement.