We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3722
    • 171 Posts
    I am struggling to get the Google map to show up.
    Using MODX Revolution 2.2.5-pl (traditional)
    mxcalendar 1.1.6 pl

    Getting this error:
    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /homepages/11/d292516919/htdocs/4bh/core/components/mxcalendars/model/mxcalendars/google_geoloc.class.inc on line 48
    
    Warning: file_get_contents(http://maps.googleapis.com/maps/api/geocode/json?address=7+Medway+Road++Milford%2C+MA+01757&sensor=true) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /homepages/11/d292516919/htdocs/4bh/core/components/mxcalendars/model/mxcalendars/google_geoloc.class.inc on line 48


    Here are my calls:
    [[!mxcalendar? &displayType=`list` &tplListItem=`tplListItemList` &isLocked=`true` &eventListlimit=`20`]]
    [[!mxcalendar? &ajaxResourceId=`27` &modalView=`true`]]

    Using a custom tplListItem

    I also tried adding this to my header:
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    
    


    Here is my test site to view:
    http://4bh.vectortechgraphics.com/events/

    Thanks
    BG66
    [ed. note: BobbyG66 last edited this post 11 years, 6 months ago.]
    • Have you tried re-installing mxCalendar?

      Did you set the displayType in your ajaxResource snippet call?

      <p>[[!mxcalendar? &displayType=`detail`]]</p>


        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 3722
        • 171 Posts
        Thanks Frogabog,
        I tried re-installing as well as removing and installing again.

        I just added the snippet call to my Ajax resource.
        Still getting the error. I had just the basic call in there before.

        Is that mentioned anywhere?
        Are there any detailed instructions on exactly every step involved?

        Thanks
        BG66
        • As far as I know, the google map just works. If you enter an address, it locates and displays it. Although, it's possible that the placeholder isn't in the modal chunk but it looks like the default one to me. I recall that it wasn't working for me at first on one installation, and then when I got the mxcalendar call correctl it showed right up. The calling of this snippet is really finicky, I've found.

          Try adding &resourceId=`` to your mxcalendar call (not in the ajax resource).

          I'd suggest searching the forums for mxcalendar and digesting some solutions that aren't in the documentation yet. The above parameter addition is actually something Charles pointed out in another thread recently. Also, the blank template for the ajax resource is not mandatory, but depending on your other js, could conflict if you use your template instead (also discussed here - worth a read).

            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 3722
            • 171 Posts
            Frogabog, Thanks for all your help.

            I got it figured out!
            http://www.solo-technology.com/blog/2010/04/07/quick-fix-for-url-file-access-is-disabled-issues
            


            I am using 1and1 as a host.
            I created a php.ini file with these lines
            allow_url_fopen = ON
            allow_url_include = ON
            


            The second line is needed if you place calls on other pages.
            Without it, it inserted the current page URL into the link.
            EDIT - I actually had to add this code to my sidebar to make it appear on another page.
            &resourceId=`4`


            Thanks
            BG66 [ed. note: BobbyG66 last edited this post 11 years, 6 months ago.]