Mobile webapp for TT RSS: ttrss-mobile

Development-related discussion, including bundled plugins
anthony
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 18 Mar 2013, 14:10
Location: Hosted tt-rss : yanobs.com/reader
Contact:

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby anthony » 24 Mar 2013, 06:23

joolz: in order to avoid ajaxErrorHandlerNot error, you have to copy conf.js-dist to conf.js and set your desktop and mobile paths.

joolz
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 23 Mar 2013, 16:47

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby joolz » 24 Mar 2013, 16:53

Thanks for the quick response.

I had already set conf.js and tried all (commented out) permutations at the bottom of this post and all give the same "ajaxErrorHandlerNot Found" (apache restart between attempts, loading the mobile page in ff with control f5). I have tt-rss installed in /opt/Tiny-Tiny-RSS-1.7.5 which is symlinked to /opt/tt-rss, which is symlinked to /var/www/tt-rss. Mobile is installed in /opt/Tiny-Tiny-RSS-1.7.5/ttrss-mobile (git commit dd144a5261b7c84b7ae7940f87c37d80a7068042). The regular site works fine btw.

/me hopes that somebody points me to some really stupid typo I missed ;-)

/* ************************************************************************************ */
/************ global config variables **********/
/* Copy config.js-dist to config.js
and set it up for your environment. */

/* relative URL from the root to access your Tiny Tiny RSS
installation */

window.apiPath="/tt-rss/";
/* window.apiPath="tt-rss/"; */
/* window.apiPath="/var/www/tt-rss/"; */
/* window.apiPath="var/www/tt-rss/"; */
/* window.apiPath="/opt/tt-rss/"; */
/* window.apiPath="opt/tt-rss/"; */
/* window.apiPath="/tt-rss"; */
/* window.apiPath="tt-rss"; */
/* window.apiPath="/var/www/tt-rss"; */
/* window.apiPath="var/www/tt-rss"; */
/* window.apiPath="/opt/tt-rss"; */
/* window.apiPath="opt/tt-rss"; */

/* relative URL from the root to access this webapp */

window.webappPath="/tt-rss/ttrss-mobile/";
/* window.webappPath="/tt-rss/ttrss-mobile/index.html"; */
/* window.webappPath="tt-rss/ttrss-mobile/"; */
/* window.webappPath="/var/www/tt-rss/ttrss-mobile/"; */
/* window.webappPath="var/www/tt-rss/ttrss-mobile/"; */
/* window.webappPath="/opt/tt-rss/ttrss-mobile/"; */
/* window.webappPath="opt/tt-rss/ttrss-mobile/"; */
/* window.webappPath="/tt-rss/ttrss-mobile"; */
/* window.webappPath="tt-rss/ttrss-mobile"; */
/* window.webappPath="/var/www/tt-rss/ttrss-mobile"; */
/* window.webappPath="var/www/tt-rss/ttrss-mobile"; */
/* window.webappPath="/opt/tt-rss/ttrss-mobile"; */
/* window.webappPath="opt/tt-rss/ttrss-mobile"; */
/* ************************************************************************************ */

User avatar
mboinet
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 13 Jan 2013, 20:51

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby mboinet » 24 Mar 2013, 16:55

Could you point me to your installation by PM if it's public?
With Chrome Inspector or Firebug the error can often be easily found.

User avatar
mboinet
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 13 Jan 2013, 20:51

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby mboinet » 24 Mar 2013, 17:11

You should not use full filesystem paths. Only URLs: path in the address bar of your browser if you prefer.

http://www.domain.com/myaccess/to/mobile-version/
http://www.domain.com/myaccess/to/TTRSS/

You just need the red part.

This webapp works in your browser, not on the server.

I'll think about a way to simplify this... but there will always need to configure something.

User avatar
joshp
Bear Rating Disaster
Bear Rating Disaster
Posts: 50
Joined: 31 Mar 2011, 11:31

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby joshp » 24 Mar 2013, 18:58

Great mobile app!
I had the same confusion.
Using tt-rss in a subdomain (ttrss.example.com), and placing this app in the leftover /mobile folder, effectivelykilling 2 birds with one stone, sicne /index.php still points mobile clients to that path...

I set the first option as: window.apiPath="/";
and the second as : window.webappPath="/mobile/";

and all of my problems went away. Hope this helps.

joolz
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 23 Mar 2013, 16:47

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby joolz » 25 Mar 2013, 11:24

@mboinet thanks for suggesting firebug, it made me find my error in seconds.

After setting ownership for all of ttrss to root:www-data, I copied conf.js-dist to conf.js being root so www-data couldn't read it

D'OH!!

Thanks for your help!

xtaz
Bear Rating Master
Bear Rating Master
Posts: 174
Joined: 24 Dec 2009, 16:48

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby xtaz » 25 Mar 2013, 12:57

fox wrote:Okay, I've looked through the latest version and I'm removing deprecated mobile/ in favor of this one. Great job.


I was just having a look through the configuration database and noticed that there are still config entries for _MOBILE*, I guess you should also remove these from the schemas?

Also a question for mboinet, this is a great little app and works quite well, but one thing I have noticed is that it doesn't appear to load every article in a feed. I just go into Fresh articles and then read every unread post using the next/previous links, but it appears to only show a certain amount of them and then I have to click back to reload the next lot and so on until they are all read. I am assuming that the ajax only loads x amount of articles to speed up processing, however I guess if it reaches the end of the list it should then automatically load the next x amount and enable the next button again? Or have I misunderstood what is going on and it's actually a bug?

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

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby fox » 25 Mar 2013, 13:07

>I was just having a look through the configuration database and noticed that there are still config entries for _MOBILE*, I guess you should also remove these from the schemas?

I usually don't bother, it's not like it matters. There was I think only one great cleansing of obsolete shit in the schema. Don't worry about it.

User avatar
mboinet
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 13 Jan 2013, 20:51

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby mboinet » 26 Mar 2013, 00:55

xtaz wrote:Also a question for mboinet, this is a great little app and works quite well, but one thing I have noticed is that it doesn't appear to load every article in a feed. I just go into Fresh articles and then read every unread post using the next/previous links, but it appears to only show a certain amount of them and then I have to click back to reload the next lot and so on until they are all read. I am assuming that the ajax only loads x amount of articles to speed up processing, however I guess if it reaches the end of the list it should then automatically load the next x amount and enable the next button again? Or have I misunderstood what is going on and it's actually a bug?

You understood very well how it works. I thought about a way to do this and it's not as easy as it can appear.
I'll add a task to the TODO list (or as I was told, as a Github issue).

WildHairZero
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 26 Mar 2013, 07:15

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby WildHairZero » 26 Mar 2013, 07:23

I am at a total loss as to what is going on with my attempt to install ttrss-mobile.

I have followed the instructions and setup conf.js:

Code: Select all

window.apiPath="/tt-rss/";

Code: Select all

window.webappPath="/tt-rss/ttrss-mobile/";


Chown www-data to the whole ttrss-mobile folders and files.

Code: Select all

-rw-r--r-- 1 www-data www-data   446 Mar 25 21:49 conf.js


When I go to my site http://www.mylifeaftergrain.com/tt-rss/ttrss-mobile I get a pop up error (Chrome, Firefox and Safari) that says:
ajaxErrorHandlerSyntaxError: JSON Parse error: Unrecognized token '<'

The strange thing is that it never asks me for a username/password and I am NOT in single user mode.

I have deleted the folder and extracted another copy and installed it again, but I keep getting this same error. Any help is greatly appreciated!!

User avatar
mboinet
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 13 Jan 2013, 20:51

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby mboinet » 26 Mar 2013, 20:23

You forgot to configure Tiny Tiny RSS: the API call is telling you to copy config.php-dist to config.php.

Is your TTRSS working?

WildHairZero
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 26 Mar 2013, 07:15

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby WildHairZero » 27 Mar 2013, 01:10

mboinet wrote:You forgot to configure Tiny Tiny RSS: the API call is telling you to copy config.php-dist to config.php.

Is your TTRSS working?


TTRSS is working like a champ and I have "Enable external API" checked, but I still get my original error.

User avatar
mboinet
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 13 Jan 2013, 20:51

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby mboinet » 27 Mar 2013, 23:47

You configured ttrss-mobile to use this address:

Code: Select all

http://www.mylifeaftergrain.com/tt-rss/api


It is returning this message:

Code: Select all

<b>Fatal Error</b>: You forgot to copy
<b>config.php-dist</b> to <b>config.php</b> and edit it.


That's why the webapp isn't working. I really believe there's someting wrong with your install: this message is coded in the index.php of Tiny Tiny RSS.

jonb
Bear Rating Trainee
Bear Rating Trainee
Posts: 19
Joined: 28 Mar 2013, 00:38

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby jonb » 28 Mar 2013, 00:48

As a newbie, I'm sure I'm missing something obvious, but...

I've got ttrss sucessfully installed in the root directory of a subdomain, and I just put the mobile app into a directory "mobile" underneath the root. I set up conf.js with

Code: Select all

window.apiPath="/;
window.webappPath="/mobile/";


When I load subdomain.mydomain.com/mobile into a browser, I get a screen with a black bar on top with the word "Categories" centered and a menu button with the options to refresh or logout. Just below that is the word "Loading...". Nothing else happens on my screen. I have "Enable external API" checked in preferences.

Oh, if I try to use the Logout option in the menu (which is weird because I never logged in on my phone), I get a never-ending progress twirly thingie.

So... thoughts?

User avatar
mboinet
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 13 Jan 2013, 20:51

Re: Mobile webapp for TT RSS: ttrss-mobile

Postby mboinet » 28 Mar 2013, 11:15

Maybe I screwed up something yesterday with my "SINGLE_USER_MODE" feature.
I really need to do proper releases.

For your problem, I'd have a look to the console and with Chrome Inspector or Firebug. There must be an error message hiden somewhere.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 2 guests