We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3232
    • 380 Posts
    I just took a look at my event log and it seems this snippet is producing an error on every call for me.

    I get "Assigning the return value of new by reference is deprecated"

    Does anyone know how to correct this?
      • 25730
      • 1 Posts
      I’m using the calendar output type. When there are multiple events on a single day is it possible for the linked date to take the user to a page that displays all of the events, rather than just one?

      - Troy

        • 29802
        • 36 Posts
        Just looked at Reports > System Events and discovered a shedload of errors:

        date() [function.date]: It is not safe to rely on the system’s timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.

        I think this has clearly been occuring since migrating to php5.

        I included the following line in the code to set the timezone which got rid of that:

        date_default_timezone_set("Europe/London");


        You should insert your applicable timezone if using the above - Find your timezone

        But now I’m up against the same event error as betoranaldi:

        Quote from: betoranaldi at Feb 29, 2008, 05:41 PM

        I just took a look at my event log and it seems this snippet is producing an error on every call for me.

        I get "Assigning the return value of new by reference is deprecated"

        Does anyone know how to correct this?

        This is new on me so maybe someone can clarify how to either turn off the error reporting (I’ve tried ’error_reporting(0);’ and variants with no luck) or if, indeed, the objects "activecalendar" and "simplepie" should be cloned?
          • 14050
          • 788 Posts
          From what I understand you should be able to turn down the error level by calling the error_reporting function (http://php.net/error-reporting). This is an E_STRICT error and it will not go away because the snippet package works with PHP 4.  If calling the error function doesn’t work, you can also set the error level lower in your php.ini file.

          Another option is to find the assets/snippets/GoogleEvents/php/simplepie.inc and do a find replace for the following:

          "=& new" to "= new"

          Let me know if that works.

          Jesse
            Jesse R.
            Consider trying something new and extraordinary.
            Illinois Wine

            Have you considered donating to MODx lately?
            Donate now. Every contribution helps.
            • 36695
            • 47 Posts
            I have a call that was working OK, but suddenly is behaving very oddly, especially in FF.
            The calendar has a fair number of events both in this month and the next.
            When calling it without debug mode on, the page just doesn’t load at all, in any browser.
            When calling it with debug, it shows the page and debug results in IE and opera, but in FF it shows it maybe once, then after pressing refresh it doesn’t for one or two presses, then shows it again, without any pattern.
            Check it out at http://www.villageaid.org/182.html (Without the debug call) and http://www.villageaid.org/183.html (With the debug call).
            The Google Events call is:
            [!GoogleEvents? &dayNameSize=`1` &outputType=`list` &maxEvents=`20` &lastEvent=`90` &tpl=`gEventsRow` &email=`[email protected]` &order=`d` &dateFormat=`D jS F, Y` !]


            On another page on my site I have embedded the Google calendar just using the iframe code provided at Google. This works OK. The feed seems to be OK.

            Any ideas please???
              • 3232
              • 380 Posts
              Quote from: Jesse at Apr 09, 2008, 01:29 PM


              Another option is to find the assets/snippets/GoogleEvents/php/simplepie.inc and do a find replace for the following:

              "=& new" to "= new"

              Let me know if that works.

              Jesse

              This worked for me, it removed all depreciated errors. Thanks Jesse!
                • 14050
                • 788 Posts
                Quote from: prioritypie at Apr 28, 2008, 04:22 PM

                I have a call that was working OK, but suddenly is behaving very oddly, especially in FF.

                That begs the question, have you changed anything?  Are you on a shared host?  Have they changed anything?


                Check it out at http://www.villageaid.org/182.html (Without the debug call) and http://www.villageaid.org/183.html (With the debug call).

                I just checked it in FF3B5 and everything looks peachy, did you figure out the problem?
                  Jesse R.
                  Consider trying something new and extraordinary.
                  Illinois Wine

                  Have you considered donating to MODx lately?
                  Donate now. Every contribution helps.
                  • 36695
                  • 47 Posts
                  The only thing that has changed is that more events have been added. The site’s on a VPS and nothing has changed there.

                  Are you saying that the first link to www.villageaid.org/182.html works fine? Even when you refresh a couple of times?
                    • 14050
                    • 788 Posts
                    Under page settings, is the page that displays the snippet cached? Try making the page uncached. Any errors showing in "System Events?" I am not exactly sure why it would work perfectly on some loads of the page while showing completely blank on others. I would naturally assume an environment issue, but maybe someone more experienced than me could chime in on that. What version of the snippet are you using?

                      Jesse R.
                      Consider trying something new and extraordinary.
                      Illinois Wine

                      Have you considered donating to MODx lately?
                      Donate now. Every contribution helps.
                      • 36695
                      • 47 Posts
                      Both the example pages in my first post are not chacheable, and I have cleared the cache too. The snippet call is uncached.
                      I’m getting the effect when I try the pages in different environments too.
                      ???