Copying flexi items by cron job

More
7 years 6 days ago - 6 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...??
Last edit: 6 years 11 months ago by Ali_wdm.

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

More
7 years 5 days 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...
The following user(s) said Thank You: Ali_wdm

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.328 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline