Recent Topics

1 Dec 14, 2005 19:59    

Okay, I installed the Alpha of 1.6 yesterday, almost utterly painlessly, and it's up and running blissfully with one exception: the RSS feed gives me an error....

XML Parsing Error: xml declaration not at start of external entity
Location: http://129.130.29.125/blogs/xmlsrv/rss2.php?blog=1
Line Number 3, Column 5:    <?xml version="1.0"?><!-- generator="b2evolution/1.6-Alpha" -->
----^

I've searched the forums and even considered poking around the .php files themselves but I'm afraid to taint what's a pretty-effective system. I know I'm missing something blatantly obvious, I just get that...feeling. Thanks for any and all help. And here's our URL:

http://129.130.29.125/blogs/

Thanks again.
--s7

3 Dec 14, 2005 21:03

*cackle* A-ha! Thanks muchly! This triggered the thought process that fixed it!

The error was in the _config.php file, which, during installation, I copied-and-pasted from the web browser because of a permissions glitch. But I made sure, as the script specified, to remove all white space at the end of the pasted section.

I utterly forgot to check for white space at the top of the file, before the "<?php" statement. Two newlines and one tab were throwing everything into a tizzy, and now that it's removed, all is fine.

It wasn't the version numbers, but somehow that got me thinking on just the right track. Thanks much for the assist!

4 Apr 01, 2007 14:57

this bug is here in 1.9.3, i view this error message

6 Apr 05, 2007 06:29

Your blog has no syndication feeds of any kind. Please clarify your issue and provide a link where we can see it happening.

8 Apr 08, 2007 05:39

I think this is a whitespace issue. The <?xml should be the very first thing in the file, but there are a couple of blank lines first. This affects the rdf skin, too.

http://theblog.ath.cx/?tempskin=_rdf

So there's probably some whitespace getting rendered by some file that comes before that. Ed, any ideas on how to track that down? theblog, have you edited any core files?

9 Apr 08, 2007 11:35

um... No. The tic_tac skin - http://skins.b2evolution.net/192/a.php?skin=tic_tac - has the lines in the head section of the _main.php file and the syndication block found at the bottom of the sidebar. Your version of it doesn't, but the skin on the skins site does.

Anyway if you've got whitespace in your feed files that'll hurt feeds from working. I'd start by looking at the _main.php file for the feed "skins" to see that they do not have an extra lines or spaces before the opening <?php thing. It might be easiest, and will certainly be quickest, to simply download the zip package again and unzip it so that you can replace the four feed "skins" from your server and upload new ones in their place. That will ensure your feed-generating files are correct, and possibly cure the problem.

If it doesn't cure the problem it certainly rules out anything in those files!

10 Apr 08, 2007 17:23

I use a very old version of tictac skin. I uploaded the 1.9.3 archive too, i have still the error but the files has uploaded today. Only the /inc/VIEW/*.php files are modified for restric the administration panel, no links with RSS feed

11 Apr 08, 2007 17:34

theblog,

Most if not all of the inc/VIEW/ files get included before the rss feed is rendered. If you added any whitespace to those files that is sent to the browser before the beginning of the feed, then it could cause this problem. Try this. Backup your changed files and copy the originals back in. If the problem goes away, then redo your changed one by one, testing it after each one.

12 Apr 08, 2007 17:43

or, add this to the very top of your _rss2/_main.php

<?php
session_start();
?>

You'll still get an error, but at least you'll know what file it's in ;)

¥

13 Apr 08, 2007 23:14

personman wrote:

theblog,

Most if not all of the inc/VIEW/ files get included before the rss feed is rendered. If you added any whitespace to those files that is sent to the browser before the beginning of the feed, then it could cause this problem. Try this. Backup your changed files and copy the originals back in. If the problem goes away, then redo your changed one by one, testing it after each one.

i've uploaded the original b2evo,
I always have the error,

or, add this to the very top of your _rss2/_main.php

<?php
session_start();
?>

You'll still get an error, but at least you'll know what file it's in Wink

¥

I added this code, i always have the error

14 Apr 09, 2007 06:25

personman wrote:

I think this is a whitespace issue. The <?xml should be the very first thing in the file, but there are a couple of blank lines first. This affects the rdf skin, too.

http://theblog.ath.cx/?tempskin=_rdf

So there's probably some whitespace getting rendered by some file that comes before that. Ed, any ideas on how to track that down? theblog, have you edited any core files?

Hi Im facing the same problem and i have found where the problem is
I validated the feed and found out that it IS a whitespace problem so I checked the \blogs\skins\_rss folder and viewed the contents of the _main.php file and sure it had many lines before the xml tag was echoed

<?php

/**

 * This template generates an RSS 2.0 feed for the requested blog's latest posts

 *

 * See {@link http://backend.userland.com/rss}

 *

 * This file is not meant to be called directly.

 * It is meant to be called automagically by b2evolution.

 *

 * This file is part of the b2evolution project - {@link http://b2evolution.net/}

 *

 * @copyright (c)2003-2006 by Francois PLANQUE - {@link http://fplanque.net/}

 *

 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)

 *

 * {@internal Open Source relicensing agreement:

 * Daniel HAHLER grants Francois PLANQUE the right to license

 * Daniel HAHLER's contributions to this file and the b2evolution project

 * under any OSI approved OSS license (http://www.opensource.org/licenses/).

 * }}

 *

 * @package evoskins

 * @subpackage rss

 *

 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

 * @author blueyed: Daniel HAHLER.

 * @author fplanque: Francois PLANQUE - {@link http://fplanque.net/}

 *

 * @version $Id: _main.php,v 1.13.2.3 2006/10/14 02:23:02 blueyed Exp $

 */

if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );



skin_content_header( 'application/xml' );	// Sets charset!



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



?>

<!-- generator="<?php echo $app_name ?>/<?php echo $app_version ?>" -->

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">

	<channel>

		<title><?php

			$Blog->disp( 'name', 'xml' );

			request_title( ' - ', '', ' - ', 'xml' );

		?></title>

		<?php

		switch( $disp )

		{

			case 'comments':

				// this includes the last comments if requested:

				require( dirname(__FILE__).'/_lastcomments.php' );

				break;



			default:

				?>

				<link><?php $Blog->disp( 'blogurl', 'xml' ) ?></link>

				<description><?php $Blog->disp( 'shortdesc', 'xml' ) ?></description>

				<language><?php $Blog->disp( 'locale', 'xml' ) ?></language>

				<docs>http://backend.userland.com/rss</docs>

				<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=<?php echo $app_version ?>"/>

				<ttl>60</ttl>

				<?php while( $Item = & $MainList->get_item() ) {	?>

				<item>

					<title><?php $Item->title( '', '', false, 'xml' ) ?></title>

					<link><?php $Item->permanent_url( 'single' ) ?></link>

					<pubDate><?php $Item->issue_date( 'r', true ) ?></pubDate>

					<dc:creator><?php $Item->get_creator_User(); $Item->creator_User->preferred_name('xml') ?></dc:creator>

					<?php $Item->categories( false, '<category domain="main">', '</category>', '<category domain="alt">', '</category>', '<category domain="external">', '</category>', "\n", 'xml' ) ?>

					<guid isPermaLink="false"><?php $Item->ID() ?>@<?php echo $baseurl ?></guid>

					<description><?php

						$Item->url_link( '', ' ', '%s', array(), 'xml' );

						$content = $Item->get_content( 1, false, T_('[...] Read more!'), '', '', '', 'xml', $rss_excerpt_length );

						echo make_rel_links_abs( $content );

					?></description>

					<content:encoded><![CDATA[<?php

						$Item->url_link( '<p>', '</p>' );

						echo make_rel_links_abs( $Item->get_content() );

					?>]]></content:encoded>

					<comments><?php comments_link( '', 1, 1 ) ?></comments>

				</item>

				<?php }

		}

		?>

	</channel>

</rss>

<?php

	$Hit->log(); // log the hit on this page



	// This is a self contained XML document, make sure there is no additional output:

	exit();

?>


So I tried removing all spaces before the xml tag and then it either displays nothing at all or it shows an empty xml document. Any clues? Coz im gouin crazy either the xml doesnt work or the php doesnt work

15 Apr 09, 2007 11:20

My php file is :

<?php
/**
 * This template generates an RSS 2.0 feed for the requested blog's latest posts
 *
 * See {@link http://backend.userland.com/rss}
 *
 * This file is not meant to be called directly.
 * It is meant to be called automagically by b2evolution.
 *
 * This file is part of the b2evolution project - {@link http://b2evolution.net/}
 *
 * @copyright (c)2003-2006 by Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
 *
 * {@internal Open Source relicensing agreement:
 * Daniel HAHLER grants Francois PLANQUE the right to license
 * Daniel HAHLER's contributions to this file and the b2evolution project
 * under any OSI approved OSS license (http://www.opensource.org/licenses/).
 * }}
 *
 * @package evoskins
 * @subpackage rss
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author blueyed: Daniel HAHLER.
 * @author fplanque: Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @version $Id: _main.php,v 1.7.2.4 2006/09/05 22:32:41 fplanque Exp $
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
skin_content_header( 'application/xml' );	// Sets charset!
echo '<?xml version="1.0" encoding="'.$io_charset.'"?'.'>';
?>
<!-- generator="<?php echo $app_name ?>/<?php echo $app_version ?>" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title><?php
			$Blog->disp( 'name', 'xml' );
			request_title( ' - ', '', ' - ', 'xml' );
		?></title>
		<?php
		switch( $disp )
		{
			case 'comments':
				// this includes the last comments if requested:
				require( dirname(__FILE__).'/_lastcomments.php' );
				break;

			default:
				?>
				<link><?php $Blog->disp( 'blogurl', 'xml' ) ?></link>
				<description><?php $Blog->disp( 'shortdesc', 'xml' ) ?></description>
				<language><?php $Blog->disp( 'locale', 'xml' ) ?></language>
				<docs>http://backend.userland.com/rss</docs>
				<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=<?php echo $app_version ?>"/>
				<ttl>60</ttl>
				<?php while( $Item = $MainList->get_item() ) {	?>
				<item>
					<title><?php $Item->title( '', '', false, 'xml' ) ?></title>
					<link><?php $Item->permanent_url( 'single' ) ?></link>
					<pubDate><?php $Item->issue_date( 'r', true ) ?></pubDate>
					<?php /* Disabled because of spambots: <author><php $Item->get_creator_User(); $Item->creator_User->email( 'xml' ) ></author> */ ?>
					<?php $Item->categories( false, '<category domain="main">', '</category>', '<category domain="alt">', '</category>', '<category domain="external">', '</category>', "\n", 'xml' ) ?>
					<guid isPermaLink="false"><?php $Item->ID() ?>@<?php echo $baseurl ?></guid>
					<description><?php
						$Item->url_link( '', ' ', '%s', array(), 'xml' );
						$Item->content( 1, false, T_('[...] Read more!'), '', '', '', 'xml', $rss_excerpt_length );
					?></description>
					<content:encoded><![CDATA[<?php
						$Item->url_link( '<p>', '</p>' );
						$Item->content()
					?>]]></content:encoded>
					<comments><?php comments_link( '', 1, 1 ) ?></comments>
				</item>
				<?php }
		}
		?>
	</channel>
</rss>
<?php
	$Hit->log(); // log the hit on this page

	// This is a self contained XML document, make sure there is no additional output:
	exit();
?>

16 Apr 09, 2007 11:55

EthicalHacker : those lines you deleted aren't causing your original problem, what you need to look for is any spaces ( or other characters ) before the <?php at the top of the page. Try opening your page in notepad to check it ;)

theblog : If the error message was exactly the same after adding the code I posted then that would suggest that you possibly have a corrupt file, try reuploading inc/model/skins/_skin.finc.php and seeing if that cures it.

¥

17 Apr 09, 2007 12:22

¥åßßå wrote:

theblog : If the error message was exactly the same after adding the code I posted then that would suggest that you possibly have a corrupt file, try reuploading inc/model/skins/_skin.finc.php and seeing if that cures it.

I uploaded thi file but I still have the error

18 Apr 09, 2007 12:38

Try this, find this section ( near the top ) of your _rss2/_main.php :

if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
skin_content_header( 'application/xml' );    // Sets charset!
echo '<?xml version="1.0" encoding="'.$io_charset.'"?'.'>'; 

Change it to this :

if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
//skin_content_header( 'application/xml' );    // Sets charset!
echo '<?xml version="1.0" encoding="'.$io_charset.'"?'.'>'; 

Save it, reupload it and see if you still get the error.

¥

19 Apr 09, 2007 12:52

this arror affect, RDF skin, RSS skin, RSS2 skin and atom Skin

when i do your modif, i view in my source code :




<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/1.9.3" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>TheBlog</title>
						<link>http://theblog.ath.cx/</link>
				<description>Ouvrir un blog gratuitement avec TheBlog c'est simple et gratuit, fournisseur de blog</description>
				<language>fr-FR</language>

				<docs>http://backend.userland.com/rss</docs>
				<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=1.9.3"/>
				<ttl>60</ttl>
								<item>
					<title>TheBlog</title>
					<link>http://theblog.ath.cx/2006/10/16/theblog</link>
					<pubDate>Mon, 16 Oct 2006 19:22:44 +0000</pubDate>

										<category domain="main">Blog</category>					<guid isPermaLink="false">25@http://theblog.ath.cx/</guid>
					<description>Bienvenue sur TheBlog, avec cette plateforme obtenez un blog de qualité en 2 minuters Actuellement installé sur la nouvelle plateforme : Accès par http://xx.theblog.ath.cx Upload de fichiersEditeur Wysiwyg.Antispam sur les commentaires et trackbacks + d'infosMulti-catégoriesMulti-thèmeNouveau : 5 blogs sur un compte en savoir + sur l'activation de ce serviceGestionnaire de fichiersNouveau 5 Mo d'espace disque pour vos images(en cas de dépassement, les images les plus grosses seront compressé, et si cela ne suffit pas, les fichiers les plus anciens seront supprimés).Mails par formulaires pour protéger du spamGestion des commentairesModération des commentairesParamètres simple au niveau de la gestionAdministration bridée pour éviter les mauvaises manipulations, exemple au niveau du répertoire média.Player Flash DewplayerAnimations flash supportésPlayer YouTube, DailyMotion, Google vidéoPlayer vidéoAnnuaire généralisteThèmesProchainement : Plus d'espaces pour le gestionnaireLes sous domaines sont désormais fixes</description>

					<content:encoded><![CDATA[<p>Bienvenue sur TheBlog, avec cette plateforme obtenez un blog de qualité en 2 minuters Actuellement installé sur la nouvelle plateforme : </p><ul><li>Accès par http://xx.theblog.ath.cx </li><li>Upload de fichiers</li><li>Editeur Wysiwyg.</li><li>Antispam sur les commentaires et trackbacks <a href="/index.php/theblogpages/2007/03/27/a_propos_de_l_antispam" title="Antispam plus d'information">+ d'infos</a></li><li>Multi-catégories</li><li>Multi-thème</li><li><strong>Nouveau : </strong>5 blogs sur un compte <a href="/index.php/theblogpages/2007/03/27/multi_blog">en savoir + sur l'activation de ce service</a></li><li>Gestionnaire de fichiers</li><li><strong>Nouveau 5 Mo d'espace disque pour vos images</strong>(en cas de dépassement, les images les plus grosses seront compressé, et si cela ne suffit pas, les fichiers les plus anciens seront supprimés).</li><li>Mails par formulaires pour protéger du spam</li><li>Gestion des commentaires</li><li>Modération des commentaires</li><li>Paramètres simple au niveau de la gestion</li><li>Administration bridée pour éviter les mauvaises manipulations, exemple au niveau du répertoire média.</li><li>Player Flash Dewplayer</li><li>Animations flash supportés</li><li>Player YouTube, DailyMotion, Google vidéo</li><li>Player vidéo</li><li><a href="/annuaire">Annuaire généraliste</a></li><li><a href="/index.php/theblogpages/2006/12/16/principaux_skins">Thèmes</a></li></ul><p>Prochainement : </p><ul><li>Plus d'espaces pour le gestionnaire</li></ul><p>Les sous domaines sont désormais fixes</p>]]></content:encoded>
					<comments>http://theblog.ath.cx/?p=25&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
				</item>
					</channel>
</rss>

20 Apr 09, 2007 12:55

I view the 2 blank line in all skin.
What is the file was touched by this error ?

21 Apr 09, 2007 13:24

That's what we're trying to find out ;)

Change the same piece of code to this and see if your error changes :

if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
echo 'hello world';
skin_content_header( 'application/xml' );    // Sets charset!
echo '<?xml version="1.0" encoding="'.$io_charset.'"?'.'>'; 

22 Apr 09, 2007 13:28

hello world is at the line 3

But my principal skin are 2 blank line too

23 Apr 09, 2007 14:18

Here's another whitespace problem:
http://forums.b2evolution.net//viewtopic.php?t=11326

There was another one this week, too, but I can't find the thread now. theblog, do you have error reporting turned on? Add this to your /conf/_config.php file:

error_reporting(E^ALL);

Then that session_start() code that YaBBa gave you will spit out an error that tells what file is inserting the whitespace.

24 Apr 09, 2007 14:19

It's the error message I'm looking for. Can you redo it ?

¥

*edit*
Morning Dan ;)
That's what I'm trying to work out as well :p

26 Apr 09, 2007 15:17

Great news. What was your solution? If other people with the same problem find this thread, your answer could help them.

27 Apr 09, 2007 15:27

Wehn i'm install the paginator hack(1,2,3,4,5) for select page, i included whitespace at the end of _hacks.php file in the /cof directory


Form is loading...