[Resolved] Problem here — hidden link

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.

This topic contains 15 replies, has 3 voices.

Last updated by Luo Yang 2 years, 7 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#562338

I am trying to: Import posts with dates into a custom post type

Link to a page where the issue can be seen: hidden link

I expected to see: The dates need to sort by date on both the front end (which works fine with a view) and the back end (which does not work)

Instead, I got: incorrect date ordering

#562375

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - this is really strange. I just checked with admin with date field and sorting works just fine.

The only difference is that I haven't imported date field using WPAllimport.

- Could you please check while importing the date field you have selected correct field type that is date field type.
- Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?

Please check this video. I've types field namely "to" added as post listing column and when I try to sort the list its working fine.
=> hidden link

I need exact steps to replicate the issue. If you are still able to reproduce the issue, could you please share exact step by step information with all necessary details to reproduce the issue.

#562826

Hi Minesh,
I did a fresh install of WP.
I installed Toolset.
I installed WP-ALLImport.
Only 2 plugins.

I made a new post type
I made a new field group - field group below
I entered a single post (this seems to make Allimport aware of the custom fields)
I then imported a testdate.csv with 10 different dates going back to 1968.
The shortdates do not import correctly (I expected that) the unix dates are picked up correctly but they do not sort correctly.

I realise that this may not be a toolset problem directly.....but I do need a way of importing dates into a custom field otherwise I will not be able to use Toolset. (By the way I really like it in all other ways!)

#563060

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

What if you try to import the data using our suggested method of CSV import and check if that help you to import content in the correct way.
=> https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/

#563079

I get exactly the same result with CSV Importer using the procedure described there. The Unixdates do not sort correctly

#563083

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can I have duplicator package of your site so that I can debug the issue further?
=> https://toolset.com/faq/provide-supporters-copy-site/

Also, don't forget to share the CSV file you are using for importing content.

I have set the next reply to private which means only you and I have access to it.

#563093

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I think you missed to share the installer.php file of duplicator package. Could you please share that one as well.

#563512

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Dear Andrew,

Minesh is not available, and I just got this thread.

I am downloading the file your provided, will feedback if there is anything found.

#563521

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the details, I can see the same problem with the duplicator package you provided, in order to duplicate the same problem from the source, I need the CSV file too, please provide a download able URL for the CSV file, which plugin are you using to import the CSV file?
WPAllimport or CSV importer plugin?

#563523

hidden link

This is the CSV I used for CSV Importer plugin

hidden link

This is the CSV I used for AllImport

#563524

These are not the final CSVs I need to import but they demonstrate the problem.

#563546

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the details, I am downloading the files, will feedback if there is anything found.

#564083

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for details, I can duplicate same problem, and escalated this thread to our 2nd tier supporters, hope there is any fix for it. I will update this thread if there is any news.

#565013

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Here is the feedback from our 2nd tier supporters:
This is not related to the CSV import plugin or All-Import plugin entirely
It is simply not ordering anyway, you can create a Date Field, save the specific Dates submitted as example in your screenshot:
https://toolset.com/wp-content/uploads/2017/08/563079-oneway.jpg?x71388

and see that it orders by string and not number.

This is a known limitation of WordPress itself.
The ADMIN POST LIST does not sort numerically but by string.

We cannot fix it.

#565047

Hi,

I have actually found a work around that works for me....
If I do not use Toolset to add this column to the Admin interface...
Instead I use Admin Columns...add as a custom field...select the correct field and set as a DATE type.
This now orders correctly as a date field.

If Admin Columns can sort a TOOLSET custom field as a DATE I find it hard to believe that it is a WordPress issue which TOOLSET cannot fix.