Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of script tags does not reflect order of resources key in POST #736

Closed
jesstelford opened this issue Mar 9, 2016 · 6 comments
Closed

Comments

@jesstelford
Copy link

For example, if I POST with the following data:

{
          html: '<div></div>',
          css: '',
          js: '/* Some react code */',
          resources: 'https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.js,https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.min.js,https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react-dom.min.js',
          wrap: 'h',// No wrap, in the head
          panel_js: 2 // version 1.7
}

The actual order of script tags in the page is:

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react-dom.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.js"></script>

Reverse alphabetic maybe? Or just random?

I've tried different permutations of the order in POST, but it always results in the same order in the rendered page. Hmm, this doesn't seem to happen every time. Occasionally, it will be in the correct order.

Since react-dom.min.js relies on react.min.js having been loaded already, this breaks my ability to create new fiddles via a POST.

Note: The order of the resources listed in the "External Resources" section of the UI is also incorrect in the same way.

@jesstelford
Copy link
Author

I see #399 was reported 2.5yrs ago, and recently archived - was this meant to be fixed? Or is it a wontfix?

@oskarkrawczyk
Copy link
Member

It's random and it's a bug.

The current codebase is frozen. We're focusing on the complete rewrite.

Unfortunately even if we'd decide to fix this, the frozen codebase is written in Django and we have no one who knows Django on the team anymore.

Sorry to say but this is a wontfix.

@jesstelford
Copy link
Author

Oh well, thanks for responding really quickly all the same :)

Any eta on the new codebase?

@oskarkrawczyk
Copy link
Member

oskarkrawczyk commented Mar 9, 2016 via email

@privatenumber
Copy link

Any updates on this? It still seems to be an issue

@oskarkrawczyk
Copy link
Member

@majkelcc Any chance you've addressed this in next branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants