Closed Rayden closed 8 years ago
What version of MODX? Can you post a few rows of your csv (or email: hello markhamstra.com(? Op 4 dec. 2011 16:27 schreef "Raymond Geerts" < reply@reply.github.com> het volgende:
when i define publishedon and/or pub_date in the header and put a unix timestamp value in the csv data it doesnt put the values into the database.
createdon works fine
I tried importing in many ways putting published in the csv and with or without checking the published checkbox in default settings.
Reply to this email directly or view it on GitHub: https://github.com/Mark-H/importX/issues/29
This occurs on MODx version 2.1.3-pl with importx version 1.0.0-pl
for example this is the CSV data (i deleted the tvs from it)
pagetitle;;;description;;;alias;;;template;;;createdon;;;publishedon;;;content Test;;;Dit is een test;;;test;;;1;;;1112902440;;;1112902440;;;
And you did set the divider to ";;;" in ImportX right?
yes ofcourse ;) it imports all the data right, even the tvs go nice. its realy just the dates for publishedon and createdon that cant be set. Because when i look at the dates they show the date and time of when the import took place.
i found a temporary solution, but that means i have to manualy call some MySQL query.
Just looking at the MODX processors' code - it looks like it needs "published" to be passed to the processor for the publishedon date to be set.
"published" is set when the pub_date is set to < now. If no pub_date is set it depends on the actual "published" value.
ok, its understandable the way that works.
the solution im using now is asfollow:
the query im using is:
SELECT link_attributes FROM modx_site_content FOR UPDATE; UPDATE modx_site_content SET createdon = link_attributes, publishedon = link_attributes, link_attributes = '' WHERE id >= '54';
the id 54 is just in my case, there are 53 resources that i created previously before the import ;)
when i define publishedon and/or pub_date in the header and put a unix timestamp value in the csv data it doesnt put the values into the database.
createdon works fine
I tried importing in many ways putting published in the csv and with or without checking the published checkbox in default settings.