CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • trailing slash or backslash causes error value id "is not of the type positive"
Pages: [1]

Author Topic: trailing slash or backslash causes error value id "is not of the type positive"  (Read 636 times)

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
trailing slash or backslash causes error value id "is not of the type positive"
November 03, 2014, 09:22:01 am
For some reason the browser is adding a backslash to the event registration url (not sure why that is ...) but if the url is /civicrm/event/register?id=808/ or /civicrm/event/register?id=808\ civicrm logs an error id (value: 808/) is not of the type Positive

Apache is supposed to strip this (tested with AllowEncodedSlashes On and Off - anyone know why this might be happening?

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: trailing slash or backslash causes error value id "is not of the type positive"
November 05, 2014, 02:44:42 am
That's interesting. Do you know at what stage the / is being added?

i.e. if you go to /civicrm/event/register?id=808 do you get redirected to /civicrm/event/register?id=808/?

Or is it that some of the event links are badly formed on specific pages?
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: trailing slash or backslash causes error value id "is not of the type positive"
November 05, 2014, 04:10:07 am
The former works fine.  If a slash or backslash trails I get the error. I thought it was apache but I have no problem with drupal if trailing.  I think it is an edge case in how civi processes the url but not able to debug.  It happens on my server and pantheon.  Could be related to drupal redirect but I doubt it as it strip trailing slash.  It is intermittent too which is puzzling.....

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: trailing slash or backslash causes error value id "is not of the type positive"
November 06, 2014, 02:33:46 am
Quote
I have no problem with drupal if trailing

I don't this you would get it with CiviCRM either if the trailing slash was at the end of the path, but it is part of the query parameter, hence interpreted differently, i.e.
Quote
/civicrm/event/register/?id=808
would be fine
but
Quote
/civicrm/event/register?id=808/
(and I think it would be a problem in Drupal as well if it were part of the parameter, e.g. https://civicrm.org/providers?country=1226/ doesn't work.

Quote
For some reason the browser is adding a backslash to the event registration url (not sure why that is ...)

On what page is it intermittently adding this slash. Is it a / or a \ ?
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • trailing slash or backslash causes error value id "is not of the type positive"

This forum was archived on 2017-11-26.