View Issue Details

IDProjectCategoryView StatusLast Update
5940Composrcore_feedback_featurespublic2024-11-20 18:32
ReporterAdam Edington Assigned ToPDStig  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Product Version11.beta4 
Summary5940: AJAX error with rating
DescriptionAn 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 InformationLooks like the full URL is missing as well as content title being undefined. Rating is still applied despite the error.
TagsNo tags attached.
Attach Tags
Attached Files
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

PDStig

2024-09-15 01:56

administrator   ~9377

What triggered the error / what were you trying to rate?

Adam Edington

2024-09-15 02:07

administrator   ~9380

Was rating a video in the root gallery carousel as admin. Also triggered the error rating a video within a subgallery.

PDStig

2024-09-15 02:13

administrator   ~9382

Gotcha, thank you. I'll investigate.

Adam Edington

2024-09-15 03:50

administrator   ~9398

Also applies to Ratings on catalogues, so maybe an issue in general.

admin

2024-11-20 18:32

administrator   ~9638

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.

admin

2024-11-20 18:32

administrator   ~9639

Fixed in Git commit 54775a55b8 (https://gitlab.com/composr-foundation/composr/commit/54775a55b8 - link will become active once code pushed to GitLab)

admin

2024-11-20 18:32

administrator   ~9640

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/).

Issue History

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