Can't import OPML at all

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Can't import OPML at all

Postby metronomista » 02 Jun 2012, 20:13

Hi,


I'm having a trouble migrating from a different RSS Reader to TT-RSS. In fact, It is the same problem I found several months ago (when I surrendered and started using that reader), I wanted to give tinytiny a chance... but I'm finding a few stones on my way :)


Started. A few months ago I tried to migrate from Google Reader, and I couldn't import my feed subscriptions. I started using another free software (rss lounge). But that software happens to be single-user designed, And that doesn't fit my needs.

Now, I'm trying to import my feeds here, without success.

First I tried using Chromium (under Ubuntu 12.04), both OS and browser up-to-date. I received this error:

This page contains the following errors:

error on line 3 at column 107: Opening and ending tag mismatch: dlg line 0 and p
Below is a rendering of the page up to the first error.

Warning: Cannot modify header information - headers already sent by (output started at /home/user/domain/rss/classes/dlg.php:9) in /home/user/domain/rss/classes/dlg.php on line 38


As I searched the forums, I found some users recommending trying a different browser, as there seems to be some unknown issue making some problems disappear as the browser chagnes. So I tried with Firefox, and I got a bit more of information:

Error de lectura XML: etiqueta sin pareja. Se esperaba: </dlg>.
Ubicación: http://www.domain.com/rss/backend.php
Número de línea 3, columna 105:


OK, I translate: it seems that </dlg> was expected... and it didn't show up :)

As another suggestion was activating the "categories" for feeds, I went to my preferences... just to discover that they were already activated from the beginning.

I receive these errors both using the export from google reader and the export from rss lounge. Funny enough, I also receive errors when I manually add a couple of feeds to my tt-rss user, then export opml, delete feeds and re-import the opml. In this case, though, feeds were added to my profile, despite the errors output.

Disappointingly, the trick of modifying the export from tt-rss adding my sources just to see if i also get a "working import" despite a long list of errors didn't work, and when I tried that I got no feeds imported.


I'm sorry for posting such a long message, I also reported some of the errors to the bug tracker, though at this time I can't be sure which of my attempts was the one I reported ( http://tt-rss.org/report.php?view=64a73 ... 3dcdbab9e3 )


Thanks again for this great piece of free software :) If I can do some extra debuggin to help you narrow this bug, just let me know :)

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Can't import OPML at all

Postby fox » 03 Jun 2012, 17:28

Post the full "page containing errors" here or on pastebin.

User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

Re: Can't import OPML at all

Postby gmargo » 03 Jun 2012, 18:43

So many things are strange about this.

1. The </dlg> almost certainly came from ttrss, not google reader or rsslounge. (classes/dlg.php: Dlg->after()).
2. An error on line 3? Should probably just be a <head> on line 3.
3. A warning about "Cannot modify header information - headers already sent" implies that you have two html documents concatenated together.

It makes me wonder how you are doing the import/export, although I only know of one way for import.
Somehow the document got corrupted.

Could there be a locale problem?

BTW, opml export through a published link seems broken.

Personally I came from Google Reader and had no problem with exporting there and importing into ttrss (other than ordering issues.) I've also exported from and imported to ttrss many times for testing purposes, always without corrupting the output or getting any errors on input.

I second fox's request for your ompl file. (and the errors)

metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Re: Can't import OPML at all

Postby metronomista » 03 Jun 2012, 19:15

Hi,

thank you guys for your help :)


This is what I just did: I exported my OPML (there is only 4 feeds now, manually added), then created a clean user, logged in using the new user credentials and tried to import the just-exported OPML.


This is all I get:

This page contains the following errors:

error on line 3 at column 107: Opening and ending tag mismatch: dlg line 0 and p
Below is a rendering of the page up to the first error.

Warning: Cannot modify header information - headers already sent by (output started at /home/user/domain.org/rss/classes/dlg.php:9) in /home/versvs/cartograf.org/rss/classes/dlg.php on line 38



Using Chrome for OS X right now. (Different system, just in case there is something wrong with my main computer, which i was using when I made my first post).

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Can't import OPML at all

Postby fox » 03 Jun 2012, 19:34

Maybe post a screenshot? Also, after failed import, open chrome dev console (f12) and type

Code: Select all

Element.show("upload_iframe");


A rectangular box should appear in the OPML section, copy what's inside and post here. If it's an error message, do view source on the box and copy that. I need the actual content.

My uneducated guess would be something with your PHP configuration.

User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

Re: Can't import OPML at all

Postby gmargo » 03 Jun 2012, 19:47

I just retested opml export from firefox, chromium, and epiphany (now inexplicably called "web"), all under Ubuntu 12.04. I get identical valid results from each.

I would try from Windows except that my Windows box decided that yesterday was a very good day to die. :(

metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Re: Can't import OPML at all

Postby metronomista » 03 Jun 2012, 19:50

Thanks again for your prompt reply.


It really is possible that i have some php problems. I'm trying to install on a shared server (dreamhost shared), I am not able to run persistent processes (So next phase will be looking at how will i update my feeds without any daemon :D).


But... truth be told, I used tt-rss in this same server a few years ago. I didn't remember to experience any problems neither installing not updating (I'm receiving an error of "daemon not running" now when i reload the page). But this time, though the application is much more perfect, I'm being unable to get it set up...



Seeing the reply from gmargo (while I was writing here), I'll maybe start from a clean schema again, and see what happens... it is what i did yesterday, but maybe something went wrong.
Attachments
Captura de pantalla 2012-06-03 a las 17.44.47.png
Iframe content
Captura de pantalla 2012-06-03 a las 17.44.47.png (66.77 KiB) Viewed 4846 times

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Can't import OPML at all

Postby fox » 03 Jun 2012, 20:06

gmargo wrote:I just retested opml export from firefox, chromium, and epiphany (now inexplicably called "web"), all under Ubuntu 12.04. I get identical valid results from each.


This is definitely something with his PHP, unfortunately I'm not sure what that might be.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Can't import OPML at all

Postby fox » 03 Jun 2012, 20:08

Unless I'm missing something I think you've posted the browser error message again, can you do view source on the iframe box that appears and post that? It shouldn't contain "opening and ending tag mismatch", just server output, e.g. cannot modify header information warning and broken XML markup afterwards.

I don't think it's something with your tt-rss setup, PHP or other server configuration weirdness seems much more likely.

User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

Re: Can't import OPML at all

Postby gmargo » 03 Jun 2012, 20:20

I've only run ttrss under Apache's mod-php.

These Dreamhost instructions: http://wiki.dreamhost.com/Installing_PHP5 say to choose PHP CGI or FastCGI.
Could that be related?

metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Re: Can't import OPML at all

Postby metronomista » 03 Jun 2012, 20:28

Thanks again,


new data :)


1. On DHost server, dropped the database and started from a clean schema. Though the error persists, it actually imports the feeds (when using google reader's export opml).

2. On my local machine (which I can admin at will), it imports everything smoothly without any errors being printed.


So it is definitely something with that server... I'll look into the link gmargo posted, but I think I'm already using Fastcgi with php 5.3, so I dont know if something else could be made :)


Thanks agaiN!

User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

Re: Can't import OPML at all

Postby gmargo » 03 Jun 2012, 20:41

Here's a possible patch. The before() and after() routines are unbalanced, I think.
It doesn't seem to make any difference in my setup, but it might for yours.

--code deleted--

EDIT: this can't be right, can it? I'm confusing inherited objects, dang it. I've got another patch, testing now..

metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Re: Can't import OPML at all

Postby metronomista » 03 Jun 2012, 20:53

Applied the patch and the error persists, but the feeds are still being imported...


As I hope the few users that will use the instance of ttrss may eventually import their feeds, my main issue now is updating feeds without any daemon.

I'm usually running scheduled actions on websites through wget of update scripts, but using wget seems to require a background daemon (that I may not have in that server).

This option in the wiki should be enough, but I'm trying to run it every few minutes (to debug) and nothing happens...

User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

Re: Can't import OPML at all

Postby gmargo » 03 Jun 2012, 20:58

Sorry, try this patch instead. It adds an explict flag for the matching element.

EDIT: Third and hopefully final version of code:

Code: Select all

diff --git a/classes/dlg.php b/classes/dlg.php
index d39f691..5c8ec0e 100644
--- a/classes/dlg.php
+++ b/classes/dlg.php
@@ -1,19 +1,24 @@
 <?php
 class Dlg extends Protected_Handler {
        private $param;
+       private $dlgflag;

        function before() {
                if (parent::before()) {
                        header("Content-Type: text/xml; charset=utf-8");
                        $this->param = db_escape_string($_REQUEST["param"]);
                        print "<dlg>";
+                       $this->dlgflag = true;
                        return true;
                }
+               $this->dlgflag = false;
                return false;
        }

        function after() {
-               print "</dlg>";
+               if ($this->dlgflag) {
+                       print "</dlg>";
+               }
        }

        function exportData() {



I'll attach the same patch as a file so it's easier to apply.
Attachments
dlg.patch3.gz
Third version
(367 Bytes) Downloaded 127 times

metronomista
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 02 Jun 2012, 19:25

Re: Can't import OPML at all

Postby metronomista » 03 Jun 2012, 21:05

thanks for the patch, no problem I can apply it just taking the code :)


PS. On my local machine, the preferred way of updating feeds is working fine. Again, the problem seems to be in the shared server I want to use (as my laptop is not online --nor with fast connection-- 24/7)


Return to “Support”

Who is online

Users browsing this forum: No registered users and 11 guests