Closed dominik1984 closed 8 years ago
The part with the templates is fixed now.
Webcron is not supported so I can't help you there. If you need webcron use the updater described in the README
Hello,
So how can I get the fix? And I am a little bit confused now regarding the Webcron. If I anable the built in feature I am getting a message that I should switch it off and use my own cron job.
There should be a yellow error message when you open the News app. I don't know what you mean by own cron.
Hello It is configured like this
The news are only updating if i click on the "fulltext search" icon. They are not loaded automatically and even not if I click on the reload icon.
Am Mi., Apr. 13, 2016 13:18 schrieb Bernhard Posselt : There should be a yellow error message when you open the News app. I don't know what you mean by own cron. — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209373972)
There is no reload icon
I can see one:
That's update mode (hover over it) which only is used for marking articles unread if they changed. If you can create a better icon, feel free to create a PR.
Oh ok - But the real issue is that the news are not updating automatically. my cron provider (all-inkl) can send an email whenever it is triggering the cron.php and I am receiving an email that the script has returned "success" every 15 minutes. But somehow the news are not getting updated. They are only updated if I click on the "fulltext search" icon or after removing and adding the RSS link
Did you go through https://github.com/owncloud/news#feeds-are-not-updated
The full text search redownloads all entries if you change it
I have one idea.
I am using the "private" mode of the browser. Can this be the reason? Is it working with Cookies / Cache
That would explain the problem at least - even if I was not seeing any info that it will not work in "private" mode
Thanks
Am Mi., Apr. 13, 2016 16:06 schrieb Bernhard Posselt : Did you go through https://github.com/owncloud/news#feeds-are-not-updated (https://github.com/owncloud/news#feeds-are-not-updated) The full text search redownloads all entries if you change it — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209461058)
Should not be an issue.
Hi,
Somehow the news are not updated on my system. I can not install a normal Cron on my server as it is a shared server but I have the possibility to setup a Webcron. This is working fine with the Owncloud core but somehow the news are not updated.
It does not matter if the checkbox in the news settings is configured as true or false
Even If I switch the cron to Ajax it is not working. It is only displaying this yellow alert message.
Does the news app only works if I have the permissions to run my own cronjobs directly on the server?
Thanks
Am Mi., Apr. 13, 2016 16:36 schrieb Bernhard Posselt : Should not be an issue. — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209477457)
Did you follow my link to the readme?
Does the news app only works if I have the permissions to run my own cronjobs directly on the server?
The cronjob must be executed as the user that owns ownCloud (usually the webserver user). Ajax and Webcron mode will not update your feeds, however the News app provides it's own parallel webcron API that you can plug into, see https://github.com/owncloud/news-updater
I do not have access to the server so I can not install this tool. Is there a way to use the Webcron job which will call every 15 min the cron.php to update the news as well? ################### Dominik Wittmann mail@dominik-wittmann.de www.dominik-wittmann.de
Am Do., Apr. 14, 2016 08:34 schrieb Bernhard Posselt :
Did you follow my link to the readme?
Does the news app only works if I have the permissions to run my own cronjobs directly on the server?
The cronjob must be executed as the user that owns ownCloud (usually the webserver user). Ajax and Webcron mode will not update your feeds, however the News app provides it's own parallel webcron API that you can plug into, see https://github.com/owncloud/news-updater (https://github.com/owncloud/news-updater)
—
You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209781536)
You can install the tool on any server.
If by webcron you mean call an URL without passing any parameters, then no. There's an API that gives you the feed and user ids, then you can call a route with each pair to update the feed (which is what the tool does)
Are there some instructions how I can install the script without any sudo command? I just have FTP access to my server Am Do., Apr. 14, 2016 09:01 schrieb Bernhard Posselt : If by webcron you mean call an URL without passing any parameters, then no. There's an API that gives you the feed and user ids, then you can call a route with each pair to update the feed (which is what the tool does) — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209789307)
Yes, check the updater README. You will need to run the program using Python 3 however
So if you are saying that you can only run FTP, I doubt that you will be able to execute a Python script
TL;DR: You can't run the app on simple webhosting. You either need:
BTW, you could also write somehting similar to updater in Python in PHP, just no one did that yet ;) That could enable webcron like what you're used to.
Hi,
I think I found a workaround
https://github.com/owncloud/news/issues/828#issuecomment-124468956 (https://github.com/owncloud/news/issues/828#issuecomment-124468956) Am Do., Apr. 14, 2016 12:11 schrieb Bernhard Posselt : BTW, you could also write somehting similar to updater in Python in PHP, just no one did that yet ;) That could enable webcron like what you're used to. — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209864364)
Won't work since webcron and ajax cron don't trigger feed updates anymore
Can this be added manually in cron.php? ################### Dominik Wittmann mail@dominik-wittmann.de www.dominik-wittmann.de
Am Do., Apr. 14, 2016 12:15 schrieb Bernhard Posselt : Won't work since webcron and ajax cron don't trigger feed updates anymore — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209865158)
No.
I just tried it and it seems to work if I use the work arround. The only problem is the yellow message which is shown if I use Webcron. ################### Dominik Wittmann mail@dominik-wittmann.de www.dominik-wittmann.de
Am Do., Apr. 14, 2016 12:38 schrieb Bernhard Posselt :
No.
—
You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209873445)
It only works in the version you are currently using. Starting with 8.5.0 ajax and webcron won't trigger updates anymore. There are different issues when using webcron. The warning message is there for a reason ;)
You can patch everything manually but don't expect support ;)
ok thanks for the update. It looks like I can not use this nice app. Thanks for all the support :-) ################### Dominik Wittmann mail@dominik-wittmann.de www.dominik-wittmann.de
Am Do., Apr. 14, 2016 13:05 schrieb Bernhard Posselt :
You can patch everything manually but don't expect support ;)
—
You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209881534)
Hi,
I got an response from my hoster. They are mentioning I shall try to call a phpx file. There I can call a python script with following syntax:
exec("/usr/bin/python Pfad zum Script 2>&1", $out, $result);
The PHP file I was able to generated but python is completly new to me. DO i need to download any .py file and link it from my PHPx file?
Thanks ################### Dominik Wittmann mail@dominik-wittmann.de www.dominik-wittmann.de
Am Do., Apr. 14, 2016 13:05 schrieb Bernhard Posselt :
You can patch everything manually but don't expect support ;)
—
You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-209881534)
Wow, that's a hack :)
Could work but you need python 3.2 and also the requests library. Im sure you can also get the requests library to work in a local folder but you'd have to Google how to do that.
Then it's probably very likely that your hoster disallowed it.
Are you familiar with php and json? An easier task would be to simply write a php script that calls the api routes (which then in turn can be called by any webcron)
i am not really a php freak. am i really the only person who is using a shared host and the news app? ;)
so I will ask my hoster to install the request library. can you just help me with the required python script?
thanks
###################### Dominik Wittmann domiwittmann@googlemail.com
Am 14.04.2016 um 19:17 schrieb Bernhard Posselt notifications@github.com:
Wow, that's a hack :)
Could work but you need python 3.2 and also the requests library. Im sure you can also get the requests library to work in a local folder but you'd have to Google how to do that.
Then it's probably very likely that your hoster disallowed it.
Are you familiar with php and json? An easier task would be to simply write a php script that calls the api routes (which then in turn can be called by any webcron)
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub
All you need to know then is here https://github.com/owncloud/news-updater/blob/master/README.rst#no-installation
I took the time to write a PHP script which can be called by your webcron:
<?php
$baseCmd = 'php -f /path/to/your/owncloud/occ news:updater:';
exec($baseCmd . 'before-update');
exec($baseCmd . 'all-feeds', $feeds);
$feeds = json_decode($feeds[0], true)['feeds'];
foreach ($feeds as $feed) {
exec($baseCmd . 'update-feed' . ' ' . $feed['id'] . ' ' . $feed['userId']);
}
exec($baseCmd . 'after-update');
Put that into a file called news-webcron.php inside your webroot and adjust the path to your owncloud (the thing in $baseCmd). Then you can call this file with your webcron
Thats the full API btw ;D
10 lines of PHP...
The above script is very simple btw. The one thing you may want to add is locking a file to prevent the script from being executed while it is running. And maybe fancy console parameters. And if you are freaky maybe use Threads for parallel updates which are in the pthreads extension which not everyone has access too.
Then again, all this has already been implemented in the Python version :) This should just give you an idea
wooooow thanks so much. will this work with newer versions as well? ;)
###################### Dominik Wittmann domiwittmann@googlemail.com
Am 15.04.2016 um 22:06 schrieb Bernhard Posselt notifications@github.com:
Thats the full API btw ;D
10 lines of PHP...
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub
Yes :)
hello,
somehow the script is not working. I modified it a little bit to see if $feeds can be recieved but it looks like it is null always. Path to owncloud was modified of course :-)
if (is_array($feeds) || is_object($feeds)) { foreach ($feeds as $feed) { exec($baseCmd . 'update-feed' . ' ' . $feed['id'] . ' ' . $feed['userId']); } } else { echo "problem"; } ################### Dominik Wittmann mail@dominik-wittmann.de www.dominik-wittmann.de
Am Fr., Apr. 15, 2016 22:16 schrieb Bernhard Posselt :
Yes :)
—
You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-210622100)
I found the problem.
THe following script in console.php is causing the issue. I removed it and it worked
if (!function_exists('pcntl_signal') && !in_array('--no-warnings', $argv)) { echo "The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php" . PHP_EOL; } ################### Dominik Wittmann mail@dominik-wittmann.de www.dominik-wittmann.de
Am Fr., Apr. 15, 2016 22:16 schrieb Bernhard Posselt :
Yes :)
—
You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-210622100)
Yeah, webhosting sucks :(
is there any fix for this console issue? :( ################### Dominik Wittmann mail@dominik-wittmann.de www.dominik-wittmann.de
Am Sa., Apr. 16, 2016 12:28 schrieb Bernhard Posselt :
Yeah, webhosting sucks :(
—
You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub (https://github.com/owncloud/news/issues/971#issuecomment-210786861)
No idea, you are asking in the wrong repo :)
Had the same problem with news app in nextcloud, thanks @BernhardPosselt :)
Hello,
I am using ownCloud version 9.0.1 and somehow I am not getting the news updated. I configured my own Webcon job which is called (verified) and returns "scuccess".
News version is 8.4.0
But the news in Owncloud are not upated. I can see following error in log:
Failed opening '/owncloud/apps/news/templates/part.content.articleaction.php' for inclusion or Failed opening '/owncloud/apps/news/templates/part.content.subscription.php' for inclusion
I check the folder and these files are really not available.
Error comes from /owncloud/lib/private/template/base.php#161
Thanks