Recent Topics

1 Aug 06, 2007 23:16    

My b2evolution Version: Not Entered

My RSS feed used to work but (last looked 2 days ago) but since then I've made some modifications to the code to add hacks and plugins. Now, I get

XML Parsing Error: xml declaration not at start of external entity
Location: http://freesite.iblogger.org/index.php?tempskin=_rss2
Line Number 2, Column 1:<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/1.10.2" -->
^

This looks to me like I made a mistake somewhere, but I can't tell where it would be. Any ideas or suggestions?

2 Aug 07, 2007 00:32

Can you at least provide us with a list of hacks and plugins tou tried? I am afraid you gave not enough clues to the cause of your problem.

Good luck

3 Aug 07, 2007 01:17

I really just need to know what files are involved in generating the RSS feed. The code they show me looks OK (see http://freesite.iblogger.org/index.php?tempskin=_rss) Nevertheless I have installed these since I last checked RSS and round it working:

TinyMCE (I think this is what the WYSIWYG is called :))
Lightbox
Avatars
Tag Cloud
Social Bookmarking
AcroLink

I'm guessing we can rule out AcroLink, Tag Cloud, and Lightbox as the problem. Probably edited something slightly wrong when setting up avatars or social bookmarking. WYSIWYG is disabled so it wouldn't be that.

4 Aug 07, 2007 01:25

You're right, but I needed a starting point.
For the XML look at the xmlrsv folder.

5 Aug 07, 2007 01:34

Somehow your first line is blank. That may cause the trouble. But I have no clue what causes the first line to be blank.
The second line is the xml declaration and that looks ok to me.

<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/1.10.2" -->

6 Aug 07, 2007 03:06

I was looking through some of the files I modified, and I found this instruction:

In skins main.php

* - Just delete the Social Bookmark Services (SBS) you don't need.

# 6.1.1: Find
<?php link_pages() ?>

# 6.1.2: Add below

<?php if( $disp == 'single' ) { ....etc...

The problem is that the line there was actually:

<?php link_pages( '#', '#', 'number', '#', '#', '%d' ) ?>

I'm not sure what the # and number additions are, but it appears that they are probably necessary for something else. I can't remember if I edited this line for one of my other installations.

7 Aug 07, 2007 03:16

This doesn't sound like the source of your problem. I run through the things you filled in ad link_pages:

void link_pages( [ $before = '#'], [ $after = '#'], [ $next_or_number = 'number'], [ $nextpagelink = '#'], [ $previouspagelink = '#'], [ $pagelink = '%d'], [ $more_file = '']  )


From the [url=http://doc.b2evolution.net/]Technical Docs[/url] it just sais you passed default variables. That means link_pages() does exactly the same as your code.
This only to ease your mind and point you to the guru stuff.

I wonder if there is any place where you can find a line break of any kind that can explain the first empty line in your rss. My first line is:

<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/2.0-alpha" -->

and that's the first line and not the second.

Do you have this behavious at rss only or also atom and rss2?

8 Aug 07, 2007 03:21

The # is empty or default default (pass what is supposed to pass). Number is a string and %d is the actual number, which will change according to the pagenumber.

Guru alert: explanation is from non guru.
number is probably a choice between an actual number or a preset text.

9 Aug 07, 2007 03:21

I checked the post and comment feeds for all RSS versions and atom. I see a blank first line in all of them.

10 Aug 07, 2007 03:32

./xmlsrv/xmlrpc.php on line 60:

// Trim requests (used by XML-RPC library); fix for mozBlog and other cases where '<?xml' isn't on the very first line
$HTTP_RAW_POST_DATA = trim( $HTTP_RAW_POST_DATA );


so I guess I was right on this first line being the problem.

11 Aug 07, 2007 04:26

It seems like that's already there and intact. What other steps would this RSS data pass through before it gets to the feed URL?

12 Aug 07, 2007 08:45

Your rss/atom feeds are generated by _main.php in /skins/_rss/ , /skins/_rss2/ , /skins/_rdf/ & /skins/_atom/

You want to check all those files for any whitespace before the xml declaration

¥

13 Aug 07, 2007 14:12

I'll look.
I haven't modified any though, and since all the feeds are screwed up it would come from one file. I see a bunch of whitespace before the first tag on my main page also, could these be related?

EDIT-
I checked, they all look fine to me. First output is:

echo '<?xml version="1.0" encoding="'.$io_charset.'"?'.'>';

No whitespace

15 Aug 07, 2007 17:24

I have noticed that I have several lines of whitespace before the first line of my regular blog pages (IE index.php). Could this be related?

Found a line of whitespace under conf/_advanced.php
And at the end of conf/_application.php
Looking more

I deleted these lines, didn't seem to have any effect.

One last idea - Is there a piece of code I can add to all the feed skin files that will delete the previous line or something?

16 Aug 08, 2007 08:15

From the looks of things you have whitespace in one of your files in /conf/ or /inc/_main.inc.php

¥

17 Aug 08, 2007 15:15

I'll checked it out again. Found one blank line at the end of _stats.php. I deleted it and no effect

18 Aug 08, 2007 19:50

I'll check the files I modded for the social bookmarking again. Maybe I missed soemthing, it's the most likely thing

19 Aug 08, 2007 20:03

SUCCESS!
Finally found it, a blank line at the end of /inc/MODEL/items/_itemlist.class.php after the ?>. Can't believe that took me half a week to solve!

20 Aug 08, 2007 20:17

Well done.
Yes, I do believe it can take half a week looking for literally nothing (blank) ;)


Form is loading...