Select to view content in your preferred language

Issues upgrading Flexviewer 3.1 (uncompiled)

8561
48
Jump to solution
12-18-2012 10:05 AM
by Anonymous User
Not applicable
Original User: btelliot

Hi All,

I've been upgrading our in-house web mapping application from flexviewer 3.0 to 3.1, and I've encountered a small problem.

The first time I load the Flexviewer application in the web browser, the User Interface doesn't load properly.  If I refresh using the F5 button, it loads properly.

Here is a screenshot of the issue:
First load:
[ATTACH=CONFIG]20039[/ATTACH]

After refresh (F5)
[ATTACH=CONFIG]20040[/ATTACH]

Any help on the matter would be appreciated.

Cheers,

Brett
0 Kudos
48 Replies
by Anonymous User
Not applicable
Original User: rzufelt

<?xml version="1.0" ?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
// Read more about ArcGIS Viewer for Flex - http://links.esri.com/flexviewer
//
////////////////////////////////////////////////////////////////////////////////
-->
<configuration>
    <title>Environmental Consultants</title>
    <subtitle>Web Mapping Application - General Reference</subtitle>
    <logo>assets/images/TERA_White.png</logo>

    <style>
        <colors>0xFFFFFF,0x1B382B,0x101010,0x000000,0xF0F0F0</colors>
        <alpha>0.8</alpha>
    </style>
    <!-- replace the following url with your own geometryservice -->
    <geometryservice url="###censored###" />

    <!-- TERA's BING MAPS KEY BELOW -->
    <bing key="###censored###"/>
    <!-- <splashpage label="TERA Environmental Consultants" config="widgets/mySplash/SplashWidget.xml" url="widgets/mySplash/SplashWidget.swf"/>-->
    <!-- UI elements -->
    <widget left="10"  top="50"    config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
    <widget right="0" bottom="0" config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>
    <widget right="20" top="55"    config="widgets/MapSwitcher/MapSwitcherWidget.xml" url="widgets/MapSwitcher/MapSwitcherWidget.swf"/>
    <widget right="100" bottom="7" config="widgets/StaticImage/StaticImageWidget.xml" url="widgets/StaticImage/StaticImageWidget.swf"/>
    <widget left="0"   top="0"     config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>

    <map wraparound180="true" initialextent="-16141587 5585597 -8642197 10056857" fullextent="-16141587 5585597 -8642197 10056857" top="40" addarcgisbasemaps="false">



Could you try moving the HeaderControllerWidget to the bottom of the list? Don't know if it will help, but I have seen several "similar" type issues if there are widgets below this in the UI section.

R_

Also, do you have the debugger version of flash player installed? It might give you an idea what is breaking the first load.
0 Kudos
by Anonymous User
Not applicable
Original User: btelliot

Hi Dasa,

I check the network developer tools for chrome, and I had a few warnings, about displaying insecured content, but no errors:
The page at https://teragisweb1.teraenv.com/apps/TESTING/TERA_FLEX_BASE_31/?config=configPublic.xml displayed insecure content from http://fpdownload.adobe.com/pub/swz/crossdomain.xml.
The page at https://teragisweb1.teraenv.com/apps/TESTING/TERA_FLEX_BASE_31/?config=configPublic.xml displayed insecure content from http://fpdownload.adobe.com/crossdomain.xml.
The page at https://teragisweb1.teraenv.com/apps/TESTING/TERA_FLEX_BASE_31/?config=configPublic.xml displayed insecure content from http://dev.virtualearth.net/crossdomain.xml.
The page at https://teragisweb1.teraenv.com/apps/TESTING/TERA_FLEX_BASE_31/?config=configPublic.xml displayed insecure content from http://dev.virtualearth.net/REST/v1/Imagery/Metadata/... etc

I also tried moving Header Controller Widget to the bottom of the list, and still no luck.


The only thing that I have had success with so far is disabling most of the <Operation Layers>.  These all display properly on my 3.0 flexviewer, but using the exact same configuration <layer></layer> tags cause the UI widgets to load improperly when they aren't drawing from a cache.

I'm going to work with the IT department on getting a copy of the application public.

Thanks again for the help,

Brett
0 Kudos
by Anonymous User
Not applicable
Original User: btelliot

I just tried loading the application in Internet Explorer, and I got this error message:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
 at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem/createChildren()
 at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem()
 at com.esri.viewer.components.toc::TOC/registerMapLayer()
 at MethodInfo-386()
 at com.esri.viewer.components.toc.utils::MapUtil$/forEachMapLayer()
 at com.esri.viewer.components.toc::TOC/registerAllMapLayers()
 at com.esri.viewer.components.toc::TOC/commitProperties()
 at mx.core::UIComponent/validateProperties()
 at mx.managers::LayoutManager/validateProperties()
 at mx.managers::LayoutManager/doPhasedInstantiation()
 at mx.managers::LayoutManager/doPhasedInstantiationCallback()


Perhaps this is a bug that is causing the UI to not display properly.
0 Kudos
RhettZufelt
MVP Notable Contributor
Hmm, that is similar errors to what I got when I was trying to load layerlist and mapswitcher and TOC together.

Have you tried commenting out the widgets one by one and see if the error/issue goes away?

I'd start with legend widget since it seems to be TOC related.

In any case, I'd try commenting out the widgets, if that doesn't do it, start with operational layers one by one.  Eventually, you should find the culprit.  then, maybe figure out why.

Could be a corrupt service that needs to be re-built or something.

Just a thought from my book of "ESRI testing" 😉

R_
0 Kudos
by Anonymous User
Not applicable
Original User: mattias_j

I tried commenting out different part of the config-file as Rhett suggested, and in my case I could narrow it down to be a problem with the PopUps. If I'm commenting out all sublayers them problems seems to disappear. But I haven't been able to figure out what the problem with the popups is.
In this case I'm using PopUp xml-files that where created using AppBuilder 3.0, I saw that AppBuilder 3.1 also adds
<showattachments>false</showattachments>
<showrelatedrecords>false</showrelatedrecords>
to the PopUp.xml files and tried addig thoose lines to my PopUp.xml files and thought it worked at first but after some more testing the problem occured again so I don't think that's the problem.... And it's not just one corrupt PopUp xml file, they all seems to cause the problem...
0 Kudos
HeatherGonzago
Esri Contributor
I just tried loading the application in Internet Explorer, and I got this error message:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
 at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem/createChildren()
 at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem()
 at com.esri.viewer.components.toc::TOC/registerMapLayer()
 at MethodInfo-386()
 at com.esri.viewer.components.toc.utils::MapUtil$/forEachMapLayer()
 at com.esri.viewer.components.toc::TOC/registerAllMapLayers()
 at com.esri.viewer.components.toc::TOC/commitProperties()
 at mx.core::UIComponent/validateProperties()
 at mx.managers::LayoutManager/validateProperties()
 at mx.managers::LayoutManager/doPhasedInstantiation()
 at mx.managers::LayoutManager/doPhasedInstantiationCallback()


Perhaps this is a bug that is causing the UI to not display properly.



Just curious,
What is the spatial reference of the basemap that you are initially loading into your application?
0 Kudos
by Anonymous User
Not applicable
Original User: btelliot

I tried commenting out different part of the config-file as Rhett suggested, and in my case I could narrow it down to be a problem with the PopUps. If I'm commenting out all sublayers them problems seems to disappear. But I haven't been able to figure out what the problem with the popups is.
In this case I'm using PopUp xml-files that where created using AppBuilder 3.0, I saw that AppBuilder 3.1 also adds
<showattachments>false</showattachments>
<showrelatedrecords>false</showrelatedrecords>
to the PopUp.xml files and tried addig thoose lines to my PopUp.xml files and thought it worked at first but after some more testing the problem occured again so I don't think that's the problem.... And it's not just one corrupt PopUp xml file, they all seems to cause the problem...



Hi Mattias,

I just tried commenting out the PopUps, and the application is now loading properly from a cleared cache.
It must be a bug with the PopUps.


Heather,

The spatial reference of my basemap is "Spatial Reference: 102100  (3857) "
Thanks again,

Brett
0 Kudos
by Anonymous User
Not applicable
Original User: btelliot

Any news on the pop-up issue in flexviewer 3.1?

There still isn't a fix for this as far as I know.  I would like to upgrade to 3.1, but I can't until this issue is resolved.

(Bump).
0 Kudos
HeatherGonzago
Esri Contributor
So the problem seems to stem from only the popups? Is it that when you initially load the map, nothing displays and then after refreshing it does display correctly? If you disable the popups, does it display correctly the first time around?

Did any of the data within the map change between 3 and 3.1? Meaning, did the indexes of the layers referenced for the popups get altered at all? I know, easy enough but thought it would be a good thing to check on that as well.
0 Kudos
by Anonymous User
Not applicable
Original User: btelliot

If you disable the popups, does it display correctly the first time around?


Correct, if the popups are disabled, it displays correctly the first time around.

  Did any of the data within the map change between 3 and 3.1? Meaning, did the indexes of the layers referenced for the popups get altered at all?


The data within the map has not changed between 3 and 3.1.  I'm using the exact same MapService(s) for both of the 3.0 and 3.1 webmap applications, and the exact same PopUp.xml files.

Here is an example of one of the PopUps config files that seems to be causing the issue.

<?xml version="1.0" ?>
<configuration>
    <title>Alberta Natural Regions and Subregions</title>        
    <fields>
        <field name="NRNAME" alias= "Natural Region: " visible="true"/>
  <field name="NSRNAME" alias= "Natural Subregion: " visible="true"/>
    </fields>
</configuration>


Thanks again for the help,
0 Kudos