Search

Hi there,

First time installing S2 and I set up a section with two text fields, one of which I 'URI' validation. It won't save any URL's though? I'm putting in for example: 'http://www.bbc.com' and it says Some errors were encountered while attempting to save. Other fields save fine? What am I missing?

AL

Your example is perfectly valid, so the problem is probably with Symphony. Just check that there's no whitespace in the URL, otherwise that will cause the regex to fail.

/^[^:.\/?#\s]+:(?:\/{2,3})?[^.\/?#\s]+(?:\.[^.\/?#\s]+)*(?:\/[^?#\s]*\??[^?#\s]*(?:#[^#\s]*)?)?$/

That's the regex Symphony uses. I made some slight modifications, so you might like to try pasting the above into the "Validation Rule" field, but I don't think that will help.

/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/

This is the regex from RFC 2396, which might work better. It will accept things that Symphony's regex won't.

Otherwise if those don't work, I suspect there could be a problem with PHP parsing the regex. There might be some information in /manifest/logs/ about the error.

Create an account or sign in to comment.

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