Copying flexi items by cron job

3 years 11 months ago - 3 years 11 months ago #71190 by Ali_wdm
I have created a system plugin which copies flexi item, this plugin is accessed by a URL. When URL is hit from cron, item is copied but with status waiting for approval. I guess it because the plugin is accessed without login user. If I hit the URL after logging user with editing permission it copies the item with 'published status'.
I want to copy flexi item with 'published status', when URL is hit from cron. What to do...??

Please Log in or Create an account to join the conversation.

3 years 11 months ago #71193 by ggppdk

if you want to do this

then inside your custom script
after you create the item
do 2 SQL queries to updated "published" column in DB tables


i mean update them for the new items

also it would be good if you only allowed the script to be executed from specific IP so that you do not get someone creating items when they should not

-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.