OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Feature Requests More Bulletproof Backbone handleResponse Method

This topic contains 1 reply, has 2 voices, and was last updated by  ishakuta 10 years, 6 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #36660

    alanstorm
    Participant

    The handleResponse method of the Backbone app controller in

    vendor/oro/platform/src/Oro/Bundle/NavigationBundle/Resources/public/js/hash.navigation.js

    doesn’t deal well with non-well-formed HTML. Specifically, a javascript exception is thrown when the jQuery filter method encounters something like this

    $('Bad Text<div>...</div>').filter('#redirect').text();

    While this doesn’t appear to cause any errors in the current release, it does stop new developers from doing simple var_dump debugging up in the business logic section of the framework.

    I don’t know what the fix should be (jQuery migrate, using JSON in place of parsed HTML, some other parsing method, etc.), or if this extra content should be silently ignored or somehow displayed, but it would help adoption with junior developers or developers coming from less modern frameworks if dropping in the occasional var_dump or echo to debug something didn’t result in the soon to be dreaded Sorry, page was not loaded correctly error.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #36661

    ishakuta
    Participant

    That already fixed, waiting beta :)

Viewing 1 replies (of 1 total)

The forum ‘OroPlatform – Feature Requests’ is closed to new topics and replies.

Back to top