Skip Navigation

[Resolved] WP All Export Pro Cron job to hit Cron URL not working unless I deactivate Types

This thread is resolved. Here is a description of the problem and solution.

Problem:
You have a CPT created by Types, and deny read permissions to guests using Access to that CPT, then Export CRON Jobs run with the WP All Import plugin, do run, but do not export anything.

As soon as Access grants read permissions for guests on that CPT, OR Access is disabled, OR Access is restricting read access but you run the CRON manually in the Browser (logged in), the CRON properly runs and exports entries successfully.

Solution:
Set "read" to true for CPT guests permissions (CRON is a guest 🙂 )

There is one more solution, create a role copy of administrator, create a user and write a small plugin to open a session when WP runs from CRON. 'DOING_CRON' constant will help.

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 55 replies, has 3 voices.

Last updated by lindsayH 6 years, 1 month ago.

Assisted by: Beda.

Author
Posts
#625374

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Lindsay

My colleague in the server team says she is out of ideas, so I'm escalating this to see if someone in second tier can help.

I'll keep you posted.

#627773

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Lindsay

Sorry for the delay getting back to you, it has been a busy few days.

My (other) colleague asks you to create a simple test to establish whether and how Types is at fault here, if that's possible.

Can you:

- if possible set up a fresh site on the same server, although you can also continue with the same site
- register a custom post type manually (you can use a tool like hidden link to generate the required code)
- set up and test a CRON job for exporting this post type. Although you don't register the post type with Types, test with Types active and test with Types disabled
- we can make some deductions about where the fault lies depending on what you find

If needs be we can then set up a server ourself where you can install a duplicate of your site. With your help my colleague could then set up the CRON jobs according to your instructions and we can debug from there.

We'll see what happens in your initial test, though.

Sorry that this is proving somewhat convoluted, but it is not an issue that has arisen before and we are not especially familiar with it.

#630277

Bot trying to close.... I think I would have to do on the live site as WP All Export Pro is a paid for plugin.

I'm a bit nervous about doing this as the site is in constant use. But I will try to pick an out of hours time when it will be easier to do. I'm unlikely to do in the near future though as I'm away for the next week on an Easter break.

Thank you for your help. I will get back to you as soon as I have any further information.

Lins

#630973

I take over this ticket since Nigel will be off and currently it is the fastest if I and you can work directly together on this.

Please let me know if you could test the steps recommended.

I suggest, if all fails, we set up that internal test site which you will need to populate, then we will most likely have a Google Hangout and set up the CRON together - this will save a lot of time.

Thanks for your cooperation.

#648186

I need to do on the live site - which is going to be difficult and time consuming. I have it on my to do list but not sure when I will be able to do. Bot trying to close.

#648289

Please let me know once you want to proceed.

#690952
CRON job - working.png
Products Manual CPT exported OK with CRON.png
Products Manual CPT.png

I have setup another Cron Job for a CPT created manually as you outlined and it works fine... please see images below; especially 'Products Manual CPT exported OK with CRON' - this shows two records exported.

I've disabled the CPT as it's a live site... and removed the cron jobs for now.

#696784

OK, hence you confirmed that the Post Types if registered manually do work, even if Types is active?
Hence, only CPTs created by Types do behave like that?

In that case, I think we need to proceed with this:
https://toolset.com/forums/topic/wp-all-export-pro-cron-job-to-hit-cron-url-not-working-unless-i-deactivate-types/page/2/#post-630973

I will ask our server admin to prepare a Server where we can work on and then we will have a call to set it up together.
I will contact you here again.

#696988

In response to your questions:
OK, hence you confirmed that the Post Types if registered manually do work, even if Types is active?
YES.

Hence, only CPTs created by Types do behave like that?
YES (and if I disable Types the processing CRON also runs correctly - i.e. it's working from the original CPT created by Types. As we established previously it can access the CPT even though Types was disabled because the records for the CPT are still in the database).

I'm concerned that because WP All Export Pro is a paid for plugin we won't be able to test on another site?

Thanks for all your help. Lindsay

#697288

That should not be an issue, we will manage to get a copy if we need one (of the paid plugin)

However, I contacted our main Server Admin and she's willing to help me on this.
Please let her get familiar with the issue and we will follow according the more experienced people's recommendations here 🙂

All I know, for now, is that this issue is not replicable locally on a clean install and that hence it must depend on some specific server or CRON settings.
My superiors will find out what it is.

I will stay in contact with you here.

#785887

Our developer checked imports extensively but was not able to test the export of the PRO version.

We can do these following things:
- we test the WP level of the CRON job with a Duplicate of your site.
https://toolset.com/faq/provide-supporters-copy-site/
- or we let the Developer act directly on your site, but this needs specific allowance by you to do so, as it may affect the site.
A backup would be mandatory.

Please let me know if you can provide either/both.

Christian, our Types Developer, will then eventually look into this again.

#871969

Thank you.

I forwarded the details.

Please if possible do not delete either the Duplicator or the access to the site, until I feedback here.

I will do this as soon I have news from Christian.

Thank you for your continued patience.

#1070289

Hi, has there been any update on this? Many thanks, Lins

#1071348

Not yet, I apologize - I will try to make a developer to free some time asap for this.

#1103228

Just to let you know I tried an external cronjob that's run online, this failed also.

Any help would be greatly received. Thank you.