[GELÖST] JS-Fehler bei iframe von Google Maps

Hilfe zu Modulen und Tags
Post Reply
simb
Forum Members
Forum Members
Posts: 26
Joined: Fri Apr 21, 2006 8:17 pm

[GELÖST] JS-Fehler bei iframe von Google Maps

Post by simb »

Hallo zusammen,

ich möchte lieber die einfache Variante der Google Maps Integration nutzen und den Iframe einbinden, der automatisch angeboten wird, statt dem CMSMS-Modul.

Soweit so gut, nur leider ist nach dem ersten absenden, der gesamte Inhalt nicht mehr editierbar, da es zu folgendem JS-Error kommt:

Fehler: ',' oder '{' erwartet, aber '*' gefunden.  Regelsatz wegen ungültigem Selektor ignoriert.
Quelldatei: http://maps.google.de/maps?f=q&hl=de&ge ... tput=embed
Zeile: 1

Fehler: Unbekannte Eigenschaft 'filter'.  Deklaration ignoriert.
Quelldatei: http://maps.google.de/maps?f=q&hl=de&ge ... tput=embed
Zeile: 1

Ich nutze CMS Made Simple 1.1.2 "Savaii" mit TinyMCE und Firefox/1.5.0.13pre

Das selbe Verhalten wurde schon hier auf französisch bemängelt.

Hat jemand eine Idee woran das liegt und noch besser eine wie man das behebt?
Last edited by simb on Thu Jan 17, 2008 8:58 pm, edited 1 time in total.
cyberman

Re: JS-Fehler bei iframe von Google Maps

Post by cyberman »

Ähmm, warum willst du es in einem Iframe ausgeben?
simb
Forum Members
Forum Members
Posts: 26
Joined: Fri Apr 21, 2006 8:17 pm

Re: JS-Fehler bei iframe von Google Maps

Post by simb »

Die Frage verstehe ich nicht so ganz.

Wenn ich auf Gmaps nach einer Adresse suche und dann auf den link rechts oben "URL zu dieser Seite" klicke, wir ein Layer eingeblendet, der u.a. den code mit dem iframe enthält.

Der Vorteil gegenüber einer Lösung mit der Gmaps API ist, dass ich nichts programmieren muss und mir über die Aktualisierung der API und somit evtl. notwendige Anpassungen meines codes keine Gedanken machen muss.
Zudem schein das existente modul ja doch z.T. Schwierigkeiten zu machen, wenn ich mir die Masse der Posts hier im Forum dazu anschaue.

Aber mal ganz abgesehen davon, kann das Verhalten von CMSMS bzw. dem TinyMCE doch auch nicht so gewünscht sein, oder?
NaN

Re: JS-Fehler bei iframe von Google Maps

Post by NaN »

Versteh das Problem nicht so richtig.
Wenn ich auf deine beiden Links klicke, bekomme ich eine riesen Seite mit einer Google-Map.
Nix mit Fehlermeldung.

Also ich hab erst gestern eine Google-Map mit Hilfe des {embed}-Tags auf meiner Seite eingebunden:

http://www.kuehlbornundmoeller.de/index.php?page=anschrift

Dazu habe ich auch den von Google angebotenen URL verwendet.
Allerdings bin ich vorher noch auf den Link "Diese Map anpassen" oder so.
Und hab dann NUR die Quelle vom iFrame kopiert und als url-Parameter beim {embed}-Tag eingefügt.
(Kleiner Tipp: den URL nicht im Editor einfügen. Google hat & schon mit & maskiert. Wenn Du das jetzt im WYSIWYG-Editor einfügst wird da & draus. Am besten im Quelltext einfügen)
cyberman

Re: JS-Fehler bei iframe von Google Maps

Post by cyberman »

simb wrote: Ich nutze CMS Made Simple 1.1.2 "Savaii" mit TinyMCE und Firefox/1.5.0.13pre
Übrigens, aktuell ist übrigens 1.2.3 und FF2.0.0.11 - nicht zuletzt wegen der Sicherheitsrisiken solltest du beide Programme aktualisieren.
simb
Forum Members
Forum Members
Posts: 26
Joined: Fri Apr 21, 2006 8:17 pm

Re: JS-Fehler bei iframe von Google Maps

Post by simb »

NaN wrote: Versteh das Problem nicht so richtig.
Wenn ich auf deine beiden Links klicke, bekomme ich eine riesen Seite mit einer Google-Map.
Nix mit Fehlermeldung.
Stimmt, hast du nicht verstanden. Es geht darum, dass das die Fehlermeldungen in der Javascript-Konsole sind, die kommen, wenn man den iframe-code einbaut. Das die Links selbst korrekt sind, weiß ich.
NaN wrote: Also ich hab erst gestern eine Google-Map mit Hilfe des {embed}-Tags auf meiner Seite eingebunden:
Super, DAS ist die Lösung! Damit wird ja auch ein iframe generiert, aber der Inhalt bleibt im WYSIWYG-Editor editierbar. Danke dafür!  ;D
cyberman wrote: Übrigens, aktuell ist übrigens 1.2.3 und FF2.0.0.11 - nicht zuletzt wegen der Sicherheitsrisiken solltest du beide Programme aktualisieren.
Ja, CMSMS werde ich aktualisieren. Firefox/1.5.0.13pre ist die aktuellste und gepatchte Version unter Ubuntu Linux "Dapper Drake" LTS. Trotzdem danke für den Hinweis.
sonictrip
Forum Members
Forum Members
Posts: 99
Joined: Thu Jan 24, 2008 4:11 pm

Re: [GELÖST] JS-Fehler bei iframe von Google Maps

Post by sonictrip »

Hi, im having the same problems trying to integrate a Google Map with CMSMS...

I've tried the IFRAME approach but cant get it to work properly...

Someone mentioned using the EMBED tags to do it instead but im getting a "Click here to install additional plugins..." link which doesn't manage to find anything to install and so the google map doesnt display.

Can someone tell us the exact EMBED code to use for including a google map on a page of CMSMS please? thank you
simb
Forum Members
Forum Members
Posts: 26
Joined: Fri Apr 21, 2006 8:17 pm

Re: [GELÖST] JS-Fehler bei iframe von Google Maps

Post by simb »

It should be easy. Just get the iframe code from the google maps page and paste it into an editor like notepad. Delete everthing but not

Code: Select all

src="http://maps.google.com/......."
as this is the URL you will need.

I created an global content block with this content:

Code: Select all

{embed url="http://maps.google.com/........" marginheight="0" marginwidth="0" height="350" scrolling="no" width="425"}
so the map will be usable on different pages within the cms.
You see where you have to adopt the URL?
Then just embed the global content block in your pages as usual.

The error message with the missing plugin is  strange in this context, but I had the problem that the iframe generated by the embed-tag was hidden with css.
I searched in this forum an found the only way to solve this, is to hack the file

Code: Select all

/plugins/function.embed.php
at line 111 removing

Code: Select all

display:none
It seems to be due to the resizing of the iframe.

I hope this helps you to struggle your way.
sonictrip
Forum Members
Forum Members
Posts: 99
Joined: Thu Jan 24, 2008 4:11 pm

Re: [GELÖST] JS-Fehler bei iframe von Google Maps

Post by sonictrip »

Hey Simb, you are the man!

The problem with the IFRAME approach to displaying a Google Map was that in the admin side, the page displays as blank when editing. So it was pretty impossible to re-edit your Google page in CMSMS... With your fix to the file /plugins/function.embed.php this is now FIXED!!! :)

So, the IFRAME way to display a Google map is now working flawlessly, thank you! :)
sonictrip
Forum Members
Forum Members
Posts: 99
Joined: Thu Jan 24, 2008 4:11 pm

Re: [GELÖST] JS-Fehler bei iframe von Google Maps

Post by sonictrip »

Oh god, it was working just fine for ages until i had to go and re-edit the Google Map page again, now i cant get into it again, the function.embed.php file even has the change you suggested above but its just showing a grey text are when i try to edit the page in the admin section again, wtf? Im using the iframe approach...
NaN

Re: [GELÖST] JS-Fehler bei iframe von Google Maps

Post by NaN »

What exactly did you change?
Sounds like the CMS doesn't save your changed content and keeps the iframe code instead.  ???
Try to create a new page and paste the {embed} tag (or the {global_content} tag if your using simbs method) again.
Does the error appear again then?

notice:
When paste the URL of your Google Map, do not paste it in the WYSIWYG area of your editor but in the HTML area.
Google already masked special chars (e.g. & into &).
When paste it inside the WYSIWYG editor it may be masked again (depends on the WYSIWYG editor) what will result into &. This causes errors in the frontend when trying to display the Google Map.
mel
Forum Members
Forum Members
Posts: 147
Joined: Mon Dec 11, 2006 11:53 pm

Re: [GELÖST] JS-Fehler bei iframe von Google Maps

Post by mel »

Hi,
I get embed working with your tip of removing "display: none". So I see my map, but I'm unable to resize it. If I change value of width or height, it did'nt do any changes. Does it related to my CSS formating or this embed tag?
Version 1.6-MLE
Post Reply

Return to “Module und Tags”