Ankündigung

Einklappen
Keine Ankündigung bisher.

PHP Warning beim Speichern durch Google Maps (von der Geolocation.php ausgelöst)

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • PHP Warning beim Speichern durch Google Maps (von der Geolocation.php ausgelöst)

    Moin,

    ich wollte gerade einen normalen CC Eintrag speichern und habe folgenden Fehler erhalten (In der Geolocation war nichts eingegeben):

    Code:
    [B]Warning[/B][COLOR=#000000][FONT=Times]: file_get_contents(https://maps.googleapis.com/maps/api/geocode/json?address=&sensor=false): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in [/FONT][/COLOR][B]system/modules/pct_customelements_plugin_customcatalog/PCT/CustomElements/Attributes/Geolocation/Geolocation.php[/B][COLOR=#000000][FONT=Times] on line [/FONT][/COLOR][B]416[/B]
     
    #0 [internal function]: __error(2, 'file_get_conten...', '/kunden/...', 416, Array)
    #1 system/modules/pct_customelements_plugin_customcatalog/PCT/CustomElements/Attributes/Geolocation/Geolocation.php(416): file_get_contents('https://maps.go...')
    #2 system/modules/pct_customelements_plugin_customcatalog/PCT/CustomElements/Attributes/Geolocation/Geolocation.php(102): PCT\CustomElements\Attributes\Geolocation->findCoordinates('')
    #3 system/modules/core/drivers/DC_Table.php(2972): PCT\CustomElements\Attributes\Geolocation->onSaveCallback(Array, Object(TranslationFields\DC_Table))
    #4 system/modules/core/classes/DataContainer.php(353): Contao\DC_Table->save('a:2:{i:0;s:0:""...')
    #5 system/modules/core/drivers/DC_Table.php(1943): Contao\DataContainer->row('{objektdaten_le...')
    #6 system/modules/core/classes/Backend.php(650): Contao\DC_Table->edit()
    #7 system/modules/core/controllers/BackendMain.php(131): Contao\Backend->getBackendModule('__cc_directory')
    #8 contao/main.php(20): Contao\BackendMain->run()
    #9 {main}  
    
    [B]Warning[/B][COLOR=#000000][FONT=Times]: Cannot modify header information - headers already sent by (output started at /kunden/.../system/helper/functions.php:65) in [/FONT][/COLOR][B]system/modules/core/library/Contao/System.php[/B][COLOR=#000000][FONT=Times] on line [/FONT][/COLOR][B]574[/B]
     
     #0 [internal function]: __error(2, 'Cannot modify h...', '/kunden/...', 574, Array)
    #1 system/modules/core/library/Contao/System.php(574): setcookie('BE_PAGE_OFFSET', '0', 0, '/', '', false, false)
    #2 system/modules/core/drivers/DC_Table.php(2092): Contao\System::setCookie('BE_PAGE_OFFSET', 0, 0)
    #3 system/modules/core/classes/Backend.php(650): Contao\DC_Table->edit()
    #4 system/modules/core/controllers/BackendMain.php(131): Contao\Backend->getBackendModule('__cc_directory')
    #5 contao/main.php(20): Contao\BackendMain->run() #6 {main}
    Viele Grüße
    Markus
    Zuletzt geändert von Sukrams; 30.04.2018, 08:39.

  • #2
    Einfach erneut speichern. Vielleicht hat Euer Inet geschlafen. Request url ist korrekt. Einfach selbst einmal testen: https://maps.googleapis.com/maps/api...=&sensor=false, ohne Adresse kommt da trotzdem ein json zurück von google.
    http://www.premium-contao-themes.com

    Kommentar


    • #3
      Ah, hab gefunden, was das verursacht: Wenn ich die Felder leer lasse macht er das. Kann ich das irgendwie unterbinden, falls ich da mal nichts eingeben möchte, bei der Map?
      Zuletzt geändert von Sukrams; 02.05.2018, 09:37.

      Kommentar


      • #4
        Wenn die Koordinaten-Felder leer sind, aber die Adressfelder gefüllt sind, wird das Feld versuchen die Koordinaten zu ermitteln. Dies löst keinen Fehler aus.
        Dies ist über einen save_callback im Feld geregelt und kann via dcaconfig annulliert werden
        http://www.premium-contao-themes.com

        Kommentar

        Lädt...
        X