PDA

View Full Version : Works in development but not in production



eladc
28 Jun 2012, 12:19 AM
Hello,

I have a pie chart that works fine when it's on development but when i build it for production the chart doesn't appear on screen.
The chart is part of a build html page so i have to render it to an existing div. There isn't any errors on the page so i can't find out what the problem is.

I attached an example to this thread,without the app-all.js because it was too big.

Thanks

friend
28 Jun 2012, 5:16 AM
If you haven't already, access your production site using Firefox w/Firebug or Chrome's Developer Tools. Inspect the script console and network panes to see if you're having any script errors or HTTP Status errors (404, 403, etc).

scottmartin
28 Jun 2012, 10:19 AM
Can you render anything to that div?
Is the production release combined into a single file?
Do you have the required files for chart?

Scott.

eladc
9 Jul 2012, 11:16 PM
I put the Sencha code after the div and it works fine. When i put it in the header it doesn't work.

I will leave it like this for now.

Thanks

friend
10 Jul 2012, 5:41 AM
It almost sounds like you're not enclosing your chart code in an Ext.onReady(function() { <...>}) block.

eladc
10 Jul 2012, 6:04 AM
No. There was jquery and Sencha code collision. now it's workung fine for me so i live it that way

jclark42796
23 Jul 2012, 7:50 AM
We have a similar situation with our charts in a production Rails environment:

Development (non-minified js)
FF 10 charts appear
IE 8 charts appear


Production (minified js, one js file but no jquery)
FF 10 charts appear
IE 8 NO charts appear, no script errors

You can't see the bar chart we created, but you get the hover text when moving the mouse over the area the chart would appear. Clicking on the bar chart "drills down" and populates a grid panel as expect. Very strange and all I can chalk it up to is the minification. However, we don't have problems with any other part of our application, just charts and it works in FF.

Any ideas?

Thanks,
Jim

scottmartin
23 Jul 2012, 8:29 AM
I have seen this in some cases where you have named a function that same in multiple JS files. The minify will eliminate the duplicate function so when it is called.. running the first occurrence, it gives the impression that it is not working, but no errors are found.

Scott.

jclark42796
24 Jul 2012, 12:15 PM
Just a quick update on this. No solution yet. What we see is a random http GET to an invalid url (404), just not sure where it's called from. Using fiddler, we couldn't find a referrer. Other than that no errors reported. BTW, tested this in IE9 and it is not a problem. Will post updates if I have any.

Thanks,
Jim