View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
5940 | Composr | core_feedback_features | public | 2024-09-15 01:44 | 2024-11-20 18:32 |
Reporter | Adam Edington | Assigned To | PDStig | ||
Priority | normal | Severity | minor | ||
Status | resolved | Resolution | fixed | ||
Product Version | 11.beta4 | ||||
Summary | 5940: AJAX error with rating | ||||
Description | An error has occurred. The page may no longer operate as expected. Please refresh the page and try again. If you get this error again, please report it to the site staff. There was a problem with an AJAX request: data/snippet.php?snippet=rating&type=&id=1&content_type=videos&template=RATING_BOX&content_url=&content_title=undefined&url=https-cms%3Amusic%2Findex.php%3Fpage%3Dgalleries%26type%3Dvideo%26id%3DGH0WFDvbHbQ&title=Raven%27s+Agony+%26gt%3B+Fallen+from+Grace&utheme=default 500: . | ||||
Additional Information | Looks like the full URL is missing as well as content title being undefined. Rating is still applied despite the error. | ||||
Tags | No tags attached. | ||||
Attach Tags | |||||
Attached Files | |||||
Time estimation (hours) | |||||
Sponsorship open | |||||
|
What triggered the error / what were you trying to rate? |
|
Was rating a video in the root gallery carousel as admin. Also triggered the error rating a video within a subgallery. |
|
Gotcha, thank you. I'll investigate. |
|
Also applies to Ratings on catalogues, so maybe an issue in general. |
|
Automated response: AJAX errors with rating content There were multiple issues here. When rating content, a 500 Internal Error would fire. This was because the PHP feedback API was confusing feedback type with content type, which are different. I clarified in the API by renaming a lot of the $content_type variables to $feedback_type. Points was trying to find the content title on a feedback type, not a content type, because of this confusion, which threw the error. This hotfix also fixes an issue with content title being undefined. This was because the JavaScript was looking at the wrong object for the title property, so it would always pass in undefined. This also resolves 6064 . This has not thoroughly been tested yet as parameters were changed in the templates from CONTENT_TYPE to FEEDBACK_TYPE to be more concise. But I did test and confirm ratings work, at least in galleries. ** This hotfix will break the Karma non-bundled add-on**. If you are using it, you will need to pull the latest commits from GitLab / update Karma when 11.beta5 comes out. |
|
Fixed in Git commit 54775a55b8 (https://gitlab.com/composr-foundation/composr/commit/54775a55b8 - link will become active once code pushed to GitLab) |
|
A hotfix (a TAR of files to upload) has been uploaded to this issue. Only apply this hotfix if you absolutely need it and cannot wait until the next release of Composr (releases are more reliable and strictly tested). As of Composr version 11, the recommended way to apply a hotfix is by following the same steps as an upgrade (https://baseurl/upgrader.php, use the hotfix on the step “Transfer across new/updated files”). The upgrader will automatically skip files belonging to addons you do not have installed or that are newer on disk than in the hotfix. Otherwise, you can manually extract and replace these files (do not replace if your on-disk file is newer than the one in the hotfix). Always take backups of your site or at least files you are replacing before applying a hotfix. Not sure how to extract TAR files to your Windows computer? Try 7-zip (http://www.7-zip.org/). |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-09-15 01:44 | Adam Edington | New Issue | |
2024-09-15 01:45 | Adam Edington | Additional Information Updated | |
2024-09-15 01:56 | PDStig | Note Added: 0009377 | |
2024-09-15 02:07 | Adam Edington | Note Added: 0009380 | |
2024-09-15 02:13 | PDStig | Note Added: 0009382 | |
2024-09-15 03:50 | Adam Edington | Note Added: 0009398 |