---
title: "rggooglemaps / XML Error / Whitespace"
url: "https://www.typo3.net/d/110865-rggooglemaps-xml-error-whitespace"
source: "typo3.net"
tags: ["Extensions","Frage"]
created: "2012-06-04"
last_reply: "2012-06-05"
replies: 4
solved: false
page: 1
pages: 1
lang: "de"
---

# rggooglemaps / XML Error / Whitespace

Extensions · 4 Antworten · gestartet 2012-06-04

## Eröffnungsbeitrag

**Herbst** · 2012-06-04 · [Beitrag #1](https://www.typo3.net/d/110865-rggooglemaps-xml-error-whitespace/1)

Ich versuche rggogglemaps zum Laufen zu bringen (da die einzige mir bekannte Google-Map mit unterschiedlichen Markern für verschiedene Kategorien).

Beim IE9 erhalte ich im FE eine Fehlermeldung (welche z.B. bei Firefox oder per Android auf Handy nicht auftaucht.

*Error: the XML response that was returned from the server is invalid. Received ...

    [​code, code, code, ...]

    You have whitespace in your response.*

Wenn die Fehlermeldung weggeklickt wird, werden die Marker aber korrekt dargestellt.

Zudem sehe ich im BE unter 'Google-Map' Punkt 2 keine Adressen, obschon 2 Testadressen korrekt hinterlegt sind.

Anschauen kann man sich das Ganze (zumindest FE) unter <http://www.herbst.ch/index.php?id=7>

Irgendwelche Ideen was falsch sein könnte?

Vielen Dank aus der Schweiz

Holger

P.S. installiert sind in der Installation vor allem die Extensions yag-Gallerie, Socials und News

## Antworten

### [#2](https://www.typo3.net/d/110865-rggooglemaps-xml-error-whitespace/2) · skydivematy · 2012-06-04

Hallo Herbst,
pack das doch mal in ein Template wo du Deine Map integriert hast.

Setup:

```typoscript
## Extra type for the ajax requests
export_xml >
export_xml = PAGE
export_xml {
  typeNum=500
  config.disableAllHeaderCode = 1
  config.metaCharset = utf-8
  config.additionalHeaders = Content-Type:text/xml;charset=utf-8
  config.xhtml_cleaning = 0
  config.admPanel = 0
  config.sendNoCacheHeaders = 1
  config.no_cache = 1
  
  ## Includes the lib:
  #includeLibs.export_xml = EXT:rggooglemap/pi1/class.tx_rgooglemap_pi1.php
  
  ## Inserting the USER cObject for XML rendering
  10 = CONTENT
  10 {
    table = tt_content
    select {
      pidInList = this   
      max = 1
      andWhere = list_type='rggooglemap_pi1'
      #  languageField = sys_language_uid
    }
    
    renderObj = COA
    renderObj {
      10 < plugin.tx_rggooglemap_pi1
      10.userFunc = tx_rggooglemap_pi1->xmlFunc
    }
  }
}
```

gruss
maty

### [#3](https://www.typo3.net/d/110865-rggooglemaps-xml-error-whitespace/3) · Herbst · 2012-06-04

Hallo maty

gemacht. leider nix.

Habe heute Abend noch etwas festgestellt. Im Firefox wird die Karte tipptopp und fehlerfrei gezeigt und es erscheinen in der 'Google-Map' unter '2. Alle Datensätze zeigen' schön brav beide Adressen aus tt_address. Im IE9 erscheint der Fehler und es werden unter '2. Alle Datensätze zeigen' keine Datensätze angezeigt.

Es muss doch irgendwo in einem Unterschied zwischen Firefox und IE9 liegen ... Wenn ich nun die Page mit <http://www.herbst.ch/index.php?id=7&type=500> aufrufe gibt es tatsächlich Unterschiede zwischen Firefox und IE9.

**IE9:**

<?xml version="1.0"?>
  -<markers>
    -<marker test="" table="tt_address" img="blue_MarkerH.png" lat="36.12012758978146" lng="-115.18341064453125" uid="1" cat="2">
      -<t>
         <![CDATA[ 2008 Las Vegas ]]>
       </t>
     </marker>
    -<marker test="" table="tt_address" img="orange_MarkerH.png" lat="35.968559348456715" lng="-114.84970092773438" uid="2" cat="1">
      -<t>
         <![CDATA[ 2012 Boulder City ]]>
       </t>
     </marker>
  </markers>

**Firefox:**
  <markers>
    <marker cat="2" uid="1" lng="-115.18341064453125" lat="36.12012758978146" img="blue_MarkerH.png" table="tt_address" test="">
      <t> 2008 Las Vegas </t>
    </marker>
    <marker cat="1" uid="2" lng="-114.84970092773438" lat="35.968559348456715" img="orange_MarkerH.png" table="tt_address" test="">
      <t> 2012 Boulder City </t>
    </marker>
  </markers>

Gibt es evtl. irgendeine Einstellung (im Core?), die dieses Fehlerverhalten des IE9 beheben könnte?

Holger

### [#4](https://www.typo3.net/d/110865-rggooglemaps-xml-error-whitespace/4) · skydivematy · 2012-06-05

Hi,
also ich bekomme das Problem im Chrome 19, IE 10, IE9, IE8, IE7 angezeigt.
Firefox 12 OK.

Ich hatte das auch schon mal. Ist aber schon ne weile her. Ich hatte das Ganze Setup von rggooglemap aus der Extension Kopiert in ein googlemap.ts im Fileadmin abgelegt und im rgooglemap Extension Template per <INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/templates/rggooglemap/googlemap_fullpage/Ressources/setup.ts"> eingebunden. Desweiteren hatte ich im rgooglemap Extension Template NICHT unter Include from Extension die Map nicht Includiert.

Hier mal das Setup ws ich Benutzt hatte. Achso. Welche rrgooglemap verwendest Du? V4 ? oder die aus dem TER?

V4 map

<https://svn.typo3.org/TYPO3v4/Extensions/rggooglemap/trunk/>

SETUP:

```typoscript
###----------------------------------------------------------------------###
### RG GOOGLEMAP ###
# Allow the tags
lib.parseFunc_RTE.allowTags := addToList(map)
lib.parseFunc.allowTags := addToList(map)

plugin.tx_rggooglemap_pi1 {
  templateFile =fileadmin/templates/rggooglemap/googlemap_fullpage/template_html/rggooglemap.html
  templateFileJS = EXT:rggooglemap/templateJS.js  
  cssFile = fileadmin/templates/rggooglemap/googlemap_fullpage/css/map.css
  pidList = 27
  recursive = 5
  mapDiv = map  
  mapWidth = 
  mapHeight = 
  mapLng = 
  mapLat = 
  mapZoom = 11
  mapKey = 
  mapType = G_NORMAL_MAP
  mapControl = 1
  mapNavigation = 1
  mapNavigationOnMouseOver = 0
  mapOverview = 0
  
  enableDoubleClickZoom = 1
  enableContinuousZoom = 1
  enableScrollWheelZoom = 1
  
  mapAvailableCats =
  mapActiveCats =  
  
  defaultCountry = Spain
  defaultTable = tt_news
  generalLL = show,search,directions,more,back,lng,lat,exampleaddress
  
  #useUserLocationForMapCenter = 1
  #useUserLocationForMapCenter.zoomLevel = 0
  
  # not yet finished
  getRecordOverlay = 0
  
  ##################
  # View MAP 
  ##################
  map {
    LL = loading,remove-directions
    
    defaultIcon = typo3conf/ext/rggooglemap/res/dot.png
    
    # Icon sizes if it can be fetched from the image
    iconSize {
      # default as fallback
      default {
        width  = 16
        height = 16
      }
      
      # use the category uid to set the sizes for each category seperatly
      999 {
        width  = 32
        height = 32
      }
    }
    
    # title of alternative maps
    tah_title = T@H
    mapnik_title = Mapnik
    debug = 0
    
    # language of the map
    addLanguage = 1
    addLanguage.override = 
    
    # cluster function
    activateCluster = 2
    
    activateCluster.3 {
      icon (
      gicons[91919199]= new GIcon(baseIcon);
      gicons[91919199].image = "###CURRENT_URL###typo3conf/ext/rggooglemap/res/icons/cluster-m2.png";
      gicons[91919199].iconSize = new GSize(56, 55);
      gicons[91919199].infoWindowAnchor = new GPoint(28, 28-);
      )
    }
    
    # use the feature of browsers like FF 3.5 to get the location of the user
    useUserLocationForMapCenter = 0
    useUserLocationForMapCenter.zoomLevel = 0
    
  }
  
  ##################
  # Category Menu
  ##################
  catMenu {
    # Icon
    icon {
      file.maxW = 11
      file.maxH = 11
    }  
  }
  
  ##################
  # Dynamic record list
  ##################
  recordList {
    LL = prev,next
    orderBy = rggmtitle ASC
    limit = 100
  }
  
  ##################
  # Search
  ##################
  search {
    minChars = 3
    fields {
      tt_address = title,description,name 
      fe_users = comments,name,first_name,last_name,company
      tx_tour_record = title,description,teasertext,waydescriptiontext
      tx_housing_record = title,description,keywords,text
      tx_city_record = title,subtitle,description
      tx_staticregion_region = title
      tt_news = title
    }
    
    LL = label_name,label_maponly,label_cat,label_radius,label_zip,label_activateradius,submit,description,clearsearch,error-header
    radiusSearch = 1
    
    radiusSearch {
      # todo > to manual
      # http://code.google.com/intl/de-DE/apis/maps/documentation/geocoding/#CSV bottom
      minAccuracy = 4
    }
    
    # modify the js which is sent at a search
    modify {
      deleteJS {
        
      }
      updateJS {
        
      }
    }
  }
  
  ##################
  # Locationbox
  ##################
  location {
    LL = description,search,exampleaddress,zoomlevel_5,zoomlevel_9,zoomlevel_14,label_address,label_zoomlevel
  }
  
  
  
  ##################
  # Active records
  ##################
  recordsOnMap {
    LL = description,wait
    
    orderBy = rggmtitle ASC
    #limit = 0,5
  }
  
  
  
  
  ##################
  # POI menu
  ##################
  menu {
    catOrder = title
    recordsOrder = rggmtitle
    recordsOrderBy = asc
    
    # stdWrap for all fields of the category
    category {
      title {
        htmlSpecialChars = 1   
      }
    }
  }
  
  # URL for the ajax request
  # 20.value is filled, so don't use that!
  xmlURL {
    returnLast = url
    parameter.dataWrap = {page:uid},500
    additionalParams.stdWrap.cObject = COA
    additionalParams.stdWrap.cObject {
      10 = TEXT
      10.value = &type=500
      
      20 = TEXT
    }
  }
  
  
  # Title which is displayed when hovering a POI icon on the map
  # choose the field which is used + stdWrap for it 
  title {
    # makes it faster because queries are smaller
    useRggmTitle = 1
    
    # otherwise specify the title field
    tt_news = title
    tx_staticregion_region = title
    tx_housing_record = title
    tx_city_record = title
    tx_tour_record = title
    
    # stdWrap for all fields, syntax is table.<stWrap>
    tt_news.noTrimWrap = |<div class="region"><u>Divespot</u>: |</div>|
    tx_staticregion_region.noTrimWrap = |<div class="region"><u>Region</u>: |</div>  |  
    tx_housing_record.noTrimWrap = |<div class="housing"><u>Unterkunft</u>: |</div>|
    tx_city_record.noTrimWrap = |<div class="city"><u>Ort</u>: |</div>|
    tx_tour_record.noTrimWrap = |<div class="tour"><u>Wanderung</u>: |</div>  |
    searchresult.noTrimWrap = |<div class=searchresult><u>Treffer</u>: |</div>|
  }
  
  
  
  ##################
  # View Directions 
  ##################
  directions {
    LL = title,description,label_country,label_record,label_address,search,remove-directions
    
    orderBy = rggmtitle ASC
    limit = 0,50
  }
  
  ##################
  # POI
  ##################
  poi {
    LL = directions_header,directions_description
    
    # TT_NEWS
    tt_news {
      phone {
        noTrimWrap = |t: | <br />|
        required = 1
        htmlSpecialChars = 0
      }
      fax {
        noTrimWrap = |f: | <br />|
        required = 1
        htmlSpecialChars = 0
      }
      image {
        htmlSpecialChars = 0
        setContentToCurrent = 1
        if.isTrue.current = 1
        stdWrap.cObject = IMAGE
        stdWrap.cObject {
          file {
            import = uploads/pics/
            import.current = 1
            import.listNum = 0
            maxW = 100
            maxH = 100
          }
        }
		wrap = <div class="poi_image">|</div>
      }
      email {
        htmlSpecialChars = 0
        setContentToCurrent = 1
        stdWrap {
          noTrimWrap = |E-mail:| <br />|
          required = 1
          typolink.parameter.current = 1
        }
        
      }    
      www {
        htmlSpecialChars = 0
        setContentToCurrent = 1
        stdWrap {
          noTrimWrap = |www: | <br />|
          required = 1
          typolink.parameter.current = 1
        }
        
      }
    }
    
    
    # CITY RECORDS
    tx_city_record {
      lng.crop=10
      lat.crop=10
      
      logo {
        htmlSpecialChars = 0
        setContentToCurrent = 1
        if.isTrue.current = 1
        stdWrap.cObject = IMAGE
        stdWrap.cObject {
          file {
            import = uploads/tx_city/
            import.current = 1
            maxW = 60
            maxH = 60
          }
          params = style="float:right"
        }
        
      }  
      
      ### add generic markers using the syntax poi.<tablename>.<generic_marker_name>
      generic {
        link = TEXT
        link {
          typolink {
            returnLast = url
            parameter.field = pid
            title.field = title
          }
        }
        
      }
      
      # end generic
    }
    
    ############
    # CITY RECORDS
    tx_staticregion_region {
      lng.crop=10
      lat.crop=10
      
      image {
        htmlSpecialChars = 0
        setContentToCurrent = 1
        if.isTrue.current = 1
        stdWrap.cObject = IMAGE
        stdWrap.cObject {
          file {
            import = uploads/tx_staticregion/
            import.current = 1
            maxW = 60
            maxH = 60
          }
          params = style="float:right"
        }
      }  
      
      ### add generic markers using the syntax poi.<tablename>.<generic_marker_name>
      generic {
        link = TEXT
        link {
          typolink {
            returnLast = url
            parameter.field = page
            title.field = title
          }
        }
        
      }
      
      # end generic
    }
    ############
    
    
    
    # TOUR RECORDS
    tx_tour_record {
      
      teaserimage {
        htmlSpecialChars = 0
        setContentToCurrent = 1
        if.isTrue.current = 1
        stdWrap.cObject = IMAGE
        stdWrap.cObject {
          file {
            import = uploads/tx_tour/
            import.current = 1
            maxW = 60
            maxH = 60
          }
          params = style="float:right"
          
          imageLinkWrap  = 1
          imageLinkWrap {  
            enable = 1
            typolink {
              title.field= tx_chgalleryTitle
              
              parameter.override.cObject = IMG_RESOURCE
              parameter.override.cObject {
                file.import.data = TSFE:lastImageInfo|origFile
                file.maxW = 800
                file.maxH = 600
                
                stdWrap.postUserFunc = user_replaceSpaces
              }
              
              # used lightbox is pmkslimbox
              ATagParams = rel="lightbox"
              ATagParams.override = rel="lightbox[presentlb{field:uid}]"
              ATagParams.insertData = 1
              
              
            }
          }  
          
        }
      }
      
      tx_rggmtour_lng.crop=10
      tx_rggmtour_lat.crop=10
      
      ### add generic markers using the syntax poi.<tablename>.<generic_marker_name>
      generic {
        link = TEXT
        link {
          typolink {
            returnLast = url
            parameter.field = pid
            title.field = title
          }
        }
        
      }
      
      # end generic
    }
    
    # Housing RECORDS
    tx_housing_record {
      htmlSpecialChars = 0
      teaserimage {
        setContentToCurrent = 1
        if.isTrue.current = 1
        stdWrap.cObject = IMAGE
        stdWrap.cObject {
          file {
            import = uploads/tx_housing/
            import.current = 1
            maxW = 60
            maxH = 60
          }
          params = style="float:right"
          
          imageLinkWrap  = 1
          imageLinkWrap {  
            enable = 1
            typolink {
              title.field= tx_chgalleryTitle
              
              parameter.override.cObject = IMG_RESOURCE
              parameter.override.cObject {
                file.import.data = TSFE:lastImageInfo|origFile
                file.maxW = 800
                file.maxH = 600
                
                stdWrap.postUserFunc = user_replaceSpaces
              }
              
              # used lightbox is pmkslimbox
              ATagParams = rel="lightbox"
              ATagParams.override = rel="lightbox[presentlb{field:uid}]"
              ATagParams.insertData = 1
              
              
            }
          }  
          
        }
      }
      
      tx_rggmhousing_lng.crop=10
      tx_rggmhousing_lat.crop=10
      
      ### add generic markers using the syntax poi.<tablename>.<generic_marker_name>
      generic {
        link = TEXT
        link {
          htmlSpecialChars = 0
          typolink {
            parameter.field = pid
            returnLast = url
            additionalParams.cObject = COA
            additionalParams.cObject {
              
              10 = CONTENT
              10 {
                table = tx_housing_cat
                select {
                  pidInList = 10798
                  selectFields = tx_housing_cat.uid as catuid
                  join =  tx_housing_record_cat_mm ON (tx_housing_cat.uid = tx_housing_record_cat_mm.uid_foreign) INNER JOIN tx_housing_record ON (tx_housing_record.uid = tx_housing_record_cat_mm.uid_local)
                  max = 1
                }
                
                renderObj = TEXT
                renderObj {
                  field = catuid
                  wrap = &tx_housing_pi1[cat]=|
                }
                
              }
              
              20 = TEXT
              20 {
                field = uid
                wrap = &tx_housing_pi1[record]=|
              }
              
            }
            title.field = title
          }
        }
        
      }
      
      # end generic
    }
    
  }
  
  # stdWrap for all markers in the popup window
  popup {
    
  }
  
}
# end pi1

# link tags
plugin.tx_rggooglemap_pi2 {
  # Target of the link
  mapId = 10851
  # use stdWrap to get e.g. the current page
  #mapId.data = page:uid
  
  # table rewrites to make it easier for the editors
  tables {
    address = tt_news
    user = fe_users
    city = tx_city_record
    house = tx_housing_record
  }
  
  # allow JS links, works only if the target ID is the current page 
  useJSlinkOnSamePage = 1
  
  # typolink for the link
  link {
    useCacheHash = 1
  }
}

# category tags
plugin.tx_rggooglemap_pi3 {
  mapId < plugin.tx_rggooglemap_pi1.mapId
}


## Extra type for the ajax requests
export_xml >
export_xml = PAGE
export_xml {
  typeNum=500
  config.disableAllHeaderCode = 1
  config.metaCharset = utf-8
  config.additionalHeaders = Content-Type:text/xml;charset=utf-8
  config.xhtml_cleaning = 0
  config.admPanel = 0
  config.sendNoCacheHeaders = 1
  config.no_cache = 1
  
  ## Includes the lib:
  #includeLibs.export_xml = EXT:rggooglemap/pi1/class.tx_rgooglemap_pi1.php
  
  ## Inserting the USER cObject for XML rendering
  10 = CONTENT
  10 {
    table = tt_content
    select {
      pidInList = this   
      max = 1
      andWhere = list_type='rggooglemap_pi1'
      #  languageField = sys_language_uid
    }
    
    renderObj = COA
    renderObj {
      10 < plugin.tx_rggooglemap_pi1
      10.userFunc = tx_rggooglemap_pi1->xmlFunc
    }
  }
}
```

Aber Adressen werden mir in FE12 nicht angezeigt. Die Marker schon in der MAP.

gruss
maty

### [#5](https://www.typo3.net/d/110865-rggooglemaps-xml-error-whitespace/5) · Herbst · 2012-06-05

Hallo maty

ich hab die Version 3.0.3 im Einsatz (mit Typo3 4.7). Da das Ganze im Firefox funktioniert, kann der Fehler aber eigentlich nicht im Setup Script liegen.

Zudem habe ich auch das Problem, dass sich das BE 'aufhängt', wenn ich per Blitzsymbol den Cache lösche (auch das funktioniert im Firefox problemlos) - ich muss dann immer die URL neu eingeben um wieder im Backend weiter arbeiten zu können.

Da beide Themen in keinem der Foren irgendwie bei anderen auftritt, vermute ich einen tieferliegenden Fehler entweder in meiner Typo3 Installation (automatisches Install-Script bei hostpoint.ch), bei Templavoila und/oder meinem CSS.

#angry#

holger

---

Quelle: „rggooglemaps / XML Error / Whitespace“, typo3.net, https://www.typo3.net/d/110865-rggooglemaps-xml-error-whitespace
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
