Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
There is a leftover @todo in the \Drupal\rest\Plugin\views\display\RestExport class. From what I understand content negotiation is is set for the moment.
Proposed resolution
Remove the todo and clean up any related code.
Remaining tasks
Remove the todo and clean up any related code.
User interface changes
none
API changes
none
Data model changes
none
Comment | File | Size | Author |
---|---|---|---|
#1 | remove_todo_in-2541490-1.patch | 772 bytes | isholgueras |
Comments
Comment #1
isholgueras CreditAttribution: isholgueras commentedI've tested almost every functionality in content negotiation for REST Export. I've checked the code that I think is a related code and everything work well. So I removed only the @todo line.
Correct me if I'm wrong.
Comment #2
Novitsh CreditAttribution: Novitsh as a volunteer commentedIf indeed the TODO is not relevant anymore, than the patch provided in #1 is good to go.
Comment #3
Jaesin CreditAttribution: Jaesin at Chapter Three commentedI think the comment is saying to remove the if statement when content negotiation has improved to the point where
$this->setContentType($this->view->getRequest()->getRequestFormat())
works without it. Meaning that a rest request should not return "html" in the first place unless there was a "html" serializer :(.Comment #4
Wim LeersAgreed with #3. This @todo is still relevant.