codefog / contao-news_categories

Extend the Contao news module with categories
MIT License
31 stars 25 forks source link

Unclear error message after restricting categories #234

Open felixww opened 1 year ago

felixww commented 1 year ago

On a previously working installation, but after upgrading to Contao 4.13.x, I noticed the following situation (steps to reproduce):


- Assign a superordinate category to a news article ('vegetable')
- Editing the the news archive, restrict available categories (that's ctrl_limitCategories in the backend html) to only subordinate categories ('melons' and 'pumpkins')
- After that, individual news articles of this archive can not be saved anymore, producing the error
"Categories: Your selection contains invalid page IDs!" (didn't look up the english message, I am reading here "Ihre Auswahl enthält ungültige Seiten-IDs!")

I would like to suggest a more telling error message, for example, "One or more of the selected categories are not available for this news archive"

Would anybody like to support a feature request? Wouldn't it be cool to be able to assign some categories -- not necessarily superordinates -- to a news archive as a whole, while not allowing editors to unset these categories for individual news articles? 

Versions used in testing: Contao 4.13.16, contao-news_categories 3.4.23