Bug #25690
closedcreating records using $tce->process_datamap() fails with _cli_scheduler user
0%
Description
I am integrating the extension ttnews_rssimport into a website and I am having trouble with this extension failing to create news records from the RSS feeds while being executed as a scheduler task.
Of course I have checked the scheduler task and it does run fine.
I have finally traced down the failure to create tt_news records from RSS to the execution of the command $tce->process_datamap(); which is used to create the categories and news records :
- While being called from the backend user this function does work.
- While being called with the scheduler user with exactly the same data passed as arguments it does fail.
After examinating Typo3 log, I have found the following error (thousands times):
"Attempt to insert a record on page 'Les Echos - France' (226) from table 'tt_news' without permissions. Or non-existing page. (msg#1.1.12)"
I have tried putting the user _cli_scheduler in a group which has powers to list and modify tt_news and tt_news_cat tables, but it has had no effect.
Then I have tried to give _cli_scheduler user all access on any item of Typo3, on any db mount on any workspace ... without success.
Last I tried to run the _cli_scheduler user as an administrator, but the scheduler doesn't allow this.
My extension is installed on Typo3 4.3.9 (I can't use a newer version since the client is stuck on IE6 by his administrator network policy)
(issue imported from #M17288)
Updated by B. St. almost 14 years ago
Same problem with scheduler (_cli_scheduler) and TCEmain functions (process_datamap) in TYPO3 4.4.4.
My task runs without problems in the backend. Called on the shell the above errors are logged and data is not written to database. For testing purposes I gave all the needed access rights to the _cli_scheduler backend use but the errors still occurred.
Errors: 'Attempt to modify/insert ... without permissions. Or non-existing page. (msg#1.1.12)"
Updated by B. St. almost 14 years ago
Problem solved for 4.4.4
- create usergroup with access rights and mountpoints you need
- give access to pages with module 'access' to this user group as you would for any 'normal' backend usergroup
- add user _cli_scheduler to this usergroup
Updated by Francois Suter almost 14 years ago
As indicated by "B. St." this should really work. I have developed an extension called "external_import" which does exactly what you're trying to achieve (i.e. get data from some external source and store it in the TYPO3 database). It's been running for 2 years on various sites with various versions of TYPO3 and works fine both in BE and CLI environment. It must really a problem with your setup.
A good way to test your setup is to use the User Admin module to switch to the _cli_scheduler user. This way you will be able to see:
- whether you have access to the storage of your records at all
- whether you can edit or create the expected records in this storage.
Updated by Alban Cousinie almost 14 years ago
The access switch using the permissions module did the trick !
You guys saved my day (I'm on a big project with tight schedule and a delivery date for...tomorow!). This problem was a big needle in my hand !
A thousand thanks !
Updated by Michael Stucki almost 11 years ago
- Project changed from 739 to TYPO3 Core
- Category changed from scheduler to scheduler
- Target version deleted (
0)