а

Events Not Rendering On Calendar


#1

I have scheduler working fine on an older server with php 5.4.16. I cannot get records to render on the calendar on a new server using php 7.2.127. I know for certain that the mysql connection is working and my data is being queried, I turned on query logging in mysql and see the queries go through every time I load the page. There are no errors in apache logs.

I am seeing this error in FF console : XML Parsing Error: XML or text declaration not at start of entity Location: http://dalvalpal.minetfiber.com/scheduler/pjevents.php?timeshift=420&uid=1558019848446 Line Number 2, Column 1:

When I follow console link to generated XML in FF, it looks like this -

<?xml version='1.0' encoding='utf-8' ?>

<start_date></start_date><end_date></end_date>
…etc through each record until end of xml

Line 1 of the xml output by FF is completely blank, and the <?xml version… starts on line 2 immediately followed by data for the first record queried. Line 3 then starts clean with the second record, so on an so forth. It seems like maybe a formatting issue and possibly why events aren’t rendering but I am not sure what is causing the issue or how to correct it if so.

I have beaten my head against the wall on this, any help would be greatly appreciated.


#2

If anyone else runs into this issue, it ended up being something very stupid… I had a blank line above <?php in my events.php, causing the formatting problem. Removed, all events now render as expected.


#3

Hi @pjarms

Happy to know that the issue is solved. Thank you for sharing the solution!


#4

Also check that file is saved “without BOM”.