ckan / ckanext-pages

A simple builtin CMS for CKAN sites
GNU General Public License v3.0
51 stars 99 forks source link

Adding flash_error message in case of missing values #97

Closed uwaheed88 closed 3 years ago

uwaheed88 commented 4 years ago

The dictization_functions only sets error keys for missing or validation error in the form. If there is an error not related to the form, it neither gets displayed in the browser neither on the terminal. The issue is that the pages extension self redirects to the edit pages link in the case of the exception rather than raising it. It redirects to the edit page with an error dictionary that gets displayed in the browser similar to when you try to add a page without a title, it will not raise an exception in the terminal although it will show the error in the browser like 'Missing Value'. This PR will add a flash message of the error summary at the top of the page to get notified of the occurrence of an error.