Author:
buzzomatic
Version:
1.1.0
Released:
21 November 2011
Category:
Other, and Workflow

New#10: Unable to import into date field

I get the following error.

Import Failed
Import failed because 76 entries did not validate, a total of 0 entries passed.
  • It looks like it's dying on the date field.
  • I'm importing the date as an ISO format. (2011-05-20).
  • If I remove the date field altogether, it works. This wasn't the case on previous versions. You could import a date into date field.

I think this might be a bug.

YOU CAN CLOSE THIS ISSUE

NEVERMIND. You have to use the dateFlip XMLImporter helper (which is included) under the PHP Function field. XMLImporter field

When importing dates, it's expecting ISO date and time so it will accept...

2011-05-21

or

2011-05-21T11:35

So when importing a typical date field from symphony...

<event-start-date time="16:00" weekday="7">2011-06-12</event-start-date>

You would import the date field like this, your XPath and PHPFunction for the XML Importer would be...

XPath: concat(event-startdate/text(),'T',event-start-date/@time)

PHP Function: XMLImporterHelpers::dateFlip

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details