Closed (works as designed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 May 2012 at 17:02 UTC
Updated:
2 Jun 2012 at 11:38 UTC
So, the problem appeared after the updating to 2.x branch. Who has any idea?
Comments
Comment #1
maciej.zgadzaj commentedPlease provide more details. Does this mean that it is somewhere else instead of the beginning of the document, or that it is not displayed at all? Have you tried clearing the cache? Have you made sure that you do not have any leftover files from the old version of the module anywhere? - Either in the module directory (try to remove the whole directory and download the new version once again) or in theme directories (any old templates left there?) Try to replicate the issue starting with basic D7 installation and if it still persist, please provide steps how to replicate it.
Comment #2
Yurkos commented1) I get this message (XML declaration not at beginning of document) when trying to open the rss page in Opera.
2) When opened in FireFox rss page does not open (just white screen) and you are prompted to download the file. In this file the rss page is saved without formatting.
3) When opened in safari rss page displayed normal.
I tried clearing the cache in each browser, removing the whole directory and downloading the new version once again but the problem remained...
Comment #3
maciej.zgadzaj commentedCould you paste here your full feed source? What you said does not give me enough information to even start investigating the problem. Have you tried replicating the issue on the clean Drupal installation, as suggested in my comment #1?
Comment #4
davisbenI too am experiencing this error. There is a single space before the
<?xml version="1.0" encoding="utf-8" ?>at the beginning of the file which is causing this.Comment #5
jamesoakleySomeone please put this back to the Views RSS project if that's where it should be, but I'm getting an identical error with Views 7.x-3.x, and so I think this is probably a bug inherited from Views rather than in Views RSS as such.
The error is exactly as described above - the default RSS feed generated by Views has whitespace before the <?xml declaration. To be strict, <?xml should be the first characters in an XML document. Opera seems to be stricter than some RSS clients in interpreting this, so fails to parse the whole file. Whether or not Opera is right to be this strict, the current version of Views is not outputting strictly valid XML.
Marking this against the D7 version, as it's usual to fix the latest release first then backport if appropriate.
Comment #6
merlinofchaos commentedI've tested the Views RSS pretty often, and it places no whitespace at the beginning. However, whitespace can appear if any PHP files you have contain whitespace prior to the
<?phpdeclaration. This is particularly common in custom modules and themes where the whitespace can be easily missed.Comment #7
dawehnerMaybe http://jimbojw.com/wiki/index.php?title=How_to_find_PHP_files_with_trail... helps you to find the problematic files.
Comment #8
jamesoakleyThanks Earl - I found the culprit. It was actually trailing spaces after the ?> tag (which probably shouldn't have been there at all).
I'll close this, as Views works as designed. If the OP for this issue thinks there is actually a flaw in Views or in Views RSS, they can always re-open it.
@dawehner - thank you for the link. It came up as a "not found" when I clicked on it. (In the end, I found the file by disabling modules a few at a time to see when the whitespace disappeared)