Bug #25690

creating records using $tce->process_datamap() fails with _cli_scheduler user

Added by Alban Cousinie about 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2011-01-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

#1

Updated by B. St. about 10 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)"

#2

Updated by B. St. about 10 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

#3

Updated by Francois Suter about 10 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.

#4

Updated by Alban Cousinie about 10 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 !

#5

Updated by Michael Stucki about 7 years ago

  • Category set to scheduler
#6

Updated by Michael Stucki about 7 years ago

  • Project changed from Scheduler to TYPO3 Core
  • Category changed from scheduler to scheduler
  • Target version deleted (0)

Also available in: Atom PDF