Skip Navigation

[Resolved] importing dates and infinite scroll

This support ticket is created 5 years, 3 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)

This topic contains 4 replies, has 2 voices.

Last updated by Beda 5 years, 2 months ago.

Assisted by: Beda.

Author
Posts
#1190953

I'm writing this ticket with the aim of getting some support for the functionality of one of my websites. (hidden link) I'm having some problems with importing content from an excel sheet to the website through the plugin WP All Import Pro. When the field of the date in the excel sheet is selected to import in two places (the date time of the post itself and a single line field), the single line field gets imported incorrectly. Instead of the format DD/MM/YY it gets reformatted to MM/DD/YY. However, that does not happen when it gets imported into the post date. I tried changing some of the excel formatting options and if I get the single field to be imported correctly - the post date does not. Some help on this problem would be greatly appreciated.
The things mentioned above can be seen on hidden link
The record date is the third line of text after each record image.

Another thing I would like to ask for: Is there a way to get a dropdown sorting option of A-Z - that being the first letter of the artist of record name on the website. I was looking for solutions on this but could not find any online which would suit my needs. hidden link - This is a link to the page I'm referring to. There is a dropdown next to the search bar that I would like to replace with the functionality I mentioned before. There is one more thing about that page as well. It has the functionality of infinite scrolling set from Toolset Views, but if you scroll down for it to start loading the first time, you would get a scrolling glitch. I tried fixing that myself, but could not manage.

Thank you in advance.

New threads created by Beda and linked to this one are listed below:

https://toolset.com/forums/topic/get-a-dropdown-sorting-option-of-a-z/

#1190993

I have split your question here https://toolset.com/forums/topic/get-a-dropdown-sorting-option-of-a-z/ as our Support Policy doesn't allow to pursue more than an issue each thread 🙂

Related to the first question, theoretically, a single line field will not be able to change date format, because it is not a date field.
It will display exactly what you input, it is not "intelligent" enough to change or recognize a date.

Hence something must be wrong in the excel value already, as that is exactly what will be written to the field, or, during the import process, the plugin you use reads this value as a date and converts it, even though you plan to import it as a string and not date.

I would make sure, the Excel you have and the mapping you do uses a string, and targets/interprets a string, not a date.
The Toolset Single Line field will then simply receive that and display it.

Let me know if this helps to spot the issue, otherwise, I would probably need a copy of named CSV and eventual details you follow to replicate the situation and see what's happening.

#1192718

Hi,

The weird thing is that the date is parsed fine into the WordPress post but when it is imported in toolset the day and month are switched around?

Kindest regards

#1192902

I am not sure to understand.
The import would populate a Toolset Field, and that will be displayed by the ShortCode, correct?
That Field is a single Line field, and it gets populated by a String like dd/mm/yy.
Hence, that value cannot become mm/dd/yy, not unless you apply some custom logic on the single line Toolset Field.

Please if possible grant me access to an example of the field you imported.
I need to see it's backend (where the field is set up) and a post where you populated this field with the import and shows in the wrong format on the front end but in the right format in the backend (or in the import only, in this case, please attach the import CSV).

Then, I can test this and see where the issue might be in, however, i suspect there must be some custom logic going on as Toolset Single Line fields are not able to do such conversion.

#1199090

I think you already advanced with the work on the website right now (as I can already not see the previous select anymore) and made a select of the alphabetical letters you mention in your above post.

However, the questions you have related to this, need to be addressed in a new, separate ticket.
I did that a while a go for you already, here:
https://toolset.com/forums/topic/importing-dates-and-infinite-scroll/#post-1190993
The problem we can handle here would relate to the Time Format being changed upon import, which you elaborate closer in the last reply as well. The other issue cannot be handled here.

Below a short summary of this current issue:
- The date in the excel sheet is set to be populating the post date (WordPress default) and the single line field of “Release Date”.
- The “Release Date” field gets data imported in the wrong order (MM/DD/YY).
- The default WordPress date for the post get imported correctly.

This is, strictly speaking, impossible, unless the import or the importing plugin changes this date formate upon import, this, because of the Toolset Single Line Field as no methods whatsoever to recognize or alter a date.

If we take some of the records posts, which is where I assume the issue happens, and compare the WordPress Publish date with this Single Line field, we see that (below some examples):
WP 8 Feb 2019 @ 00:00 / Field 08/02/2019
(etc)

This is the exact same format.
It's the day, month and year in WP; and day, month and year in the field.
I saw this on the posts:
hidden link
hidden link
hidden link

Can you show me where this happens?
Also, as I mentioned earlier, I likely would need a copy of that csv so I could simulate an import and confirm the error.

Thank you for the additional information!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.