Copying flexi items by cron job

4 months 1 week ago - 4 months 3 days 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.

4 months 1 week ago #71193 by ggppdk
Hello

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

__content
__flexicontent_items_tmp

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!
The following user(s) said Thank You: Ali_wdm

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.