Skip Navigation

[Resolved] date custom field has value of 1970/1/1 when Importing from a csv file

This support ticket is created 4 years, 12 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 19 replies, has 3 voices.

Last updated by Christian Cox 4 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1393311

It doesn't seem to be related to the separated filters and results. I tested this by temporarily removing the separate shortcodes and reinserting the View as one shortcode, but the problem remained. I will run a few more tests by disabling some plugins temporarily to see if there is a conflict somewhere - if you're on the site you'll see some weirdness as I turn things on and off. I'll update you shortly.

#1394557
Screenshot from 2019-11-28 14-18-45.png

The Toolset > Setting > Custom Code is not loading, Can you investigate on this issue? Thanks.

#1395681

Hi Christian,
It's still loading today like the screenshot above. Where else can I read the shortcode such that I can add or understand how to adjust the values for different time scales like months and weeks?

#1397533
Screenshot from 2019-12-02 11-49-43.png

Hi Christian,
Still not loading.
Can you please add 'n months ago 0:00:00', 'n weeks ago 0:00:00' and 'n days ago 0:00:00' into the shortcode?
Thanks.

#1397999
Screen Shot 2019-12-02 at 11.49.23 AM.png

Still not loading.
Yes because it looks like someone set the site's URL incorrectly in wp-admin > Settings > General. This was causing errors in the custom code screen because the staging site was trying to load scripts from the live site. That causes a security exception. I have updated the site URL in settings so that is no longer happening, and now the custom code page loads as expected.

Can you please add 'n months ago 0:00:00', 'n weeks ago 0:00:00' and 'n days ago 0:00:00' into the shortcode?
I don't quite understand what this means, sorry. The "n" here must be predefined in the solution we have available.
For example, if you wanted to add Past 5 Days to the filter options, you would change this code in the View filters:

[wpv-control-postmeta field="wpcf-blog-date" type="select" url_param="wpv-wpcf-blog-date" source="custom" display_values="Any, Past Year, Past 3 Years, Past 5 Years" values="-9999999,[tssupp-strtotime str='1 years ago 0:00:00'],[tssupp-strtotime str='3 years ago 0:00:00'],[tssupp-strtotime str='5 years ago 0:00:00']"]

The updated code would look like this with the new option:

[wpv-control-postmeta field="wpcf-blog-date" type="select" url_param="wpv-wpcf-blog-date" source="custom" display_values="Any, Past 5 Days, Past Year, Past 3 Years, Past 5 Years" values="-9999999,[tssupp-strtotime str='5 days ago 0:00:00'],[tssupp-strtotime str='1 years ago 0:00:00'],[tssupp-strtotime str='3 years ago 0:00:00'],[tssupp-strtotime str='5 years ago 0:00:00']"]

Note that I changed the display_values to add the new option text label, and I also changed the values to include one new item using the new timeframe in our custom shortcode.