ErwinKomen / RU-passim

0 stars 0 forks source link

Clicking on star to save/unsave item in list view very difficult #695

Closed shariboodts closed 3 months ago

shariboodts commented 1 year ago

Trying to save/unsave an item by clicking on the star in the list view is difficult. Often when clicking on it, nothing happens. It does not seem to be related to the careful positioning of the cursor. When it will and will not work seems very random.

Irisdenis commented 4 months ago

edit: When testing this, I've found the 'saving' of an item in list view works reasonably well (though the star sometimes needs a moment to 'register' before it turns blue). However, I am having trouble 'unsaving' the blue stars by clicking on them again, even though I'm clicking very specifically (e.g. after zooming in, or after seeing the pop-up text 'remove from your saved items').

edit2: the trick, it appears, is to refresh the page in between: so, 'saving' items by clicking the stars, refreshing the page, and 'unsaving' them. This seemingly works fine - should we alert users to this option and close the issue?

ErwinKomen commented 4 months ago

Was this related to #678? I tried adding CSS:

.sitem-button {
    ...,
    width: 100%;
    display: block;
}

But that didn't solve it. Then I looked at the JS in ru.dct.js function do_saveditem(). There was an oversight: the correct form-relative sitemaction form element is in $(frm).find("#id_sitemaction")

Now it works correctly

Irisdenis commented 4 months ago

Unfortunately, I now (06-06-2024, 16:00) get a 'Server error (500)' whenever trying to save an item (any item). Only after clicking back to the previous page and after reloading the page, is the element in question saved. The same server error appears when trying to 'unsave' the item.

ErwinKomen commented 3 months ago

I checked, saw in the server log that there was /saveditem activity, but there are no errors in the logs. Are you sure you did Ctrl + F5, to refresh the browser's cache?

I cannot reproduce the error. Do others have it??