Rating #386

Open
opened 2026-10-04 23:55:58 +02:00 by adam · 2 comments
Owner

Ratings have broken for me when using $conf['rate_items'] array entries that aren't integers 0-9, I used the LocalFiles Editor plugin.

The star icons filled incorrectly.
The rating score did not update for some values.
Non-numeric rate items cause an error when selected.

Thanks.

Ratings have broken for me when using $conf['rate_items'] array entries that aren't integers 0-9, I used the LocalFiles Editor plugin. The star icons filled incorrectly. The rating score did not update for some values. Non-numeric rate items cause an error when selected. Thanks. <!-- github-sync-id:125796387 -->
Author
Owner

Rate items are supposed to be integers. You can only choose where you start and basically how many different marks you want to have.
Obviously rating score cannot be updated for non numeric values and the database backend expect integer for rates

Rate items are supposed to be integers. You can only choose where you start and basically how many different marks you want to have. Obviously rating score cannot be updated for non numeric values and the database backend expect integer for rates <!-- github-comment-id:170325407 -->
Author
Owner

Thanks for replying, perhaps this could be documented in config_default.inc.php or could raise an error? It is not obvious from outside that you can't say have an ordered array ['bad','alright','good','excellent']. Also if I wasn't clear before combinations of 0-9 i.e. 10 caused the first problem.
rating10

Thanks for replying, perhaps this could be documented in config_default.inc.php or could raise an error? It is not obvious from outside that you can't say have an ordered array ['bad','alright','good','excellent']. Also if I wasn't clear before combinations of 0-9 i.e. 10 caused the first problem. ![rating10](https://cloud.githubusercontent.com/assets/6650190/12221692/8b8a6e80-b79d-11e5-9c70-c066bda935f1.png) <!-- github-comment-id:170344277 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#386