1

We have a new Drupal 8 site that we cannot update some content on. Saving the content fails if the main body field contains 1 or more apostrophes or semicolons. If I remove those characters, the content saves fine.

This behavior is only happening on the production server. The development server does not have the problem (although the two environments are different).

The production server has the following:

  • RHEL 6
  • Apache 2.2.15
  • PHP 5.6.30
  • Drupal 8.2.6

When the content fails to save, I see a HTTP status code of 302 returned in the browser console and then get redirected to the home page of the site.

When the content saves, I see a status code of 303 returned and then get redirected to either the content overview page or the published page depending on how I got to the node edit form.

I'm not seeing any PHP error messages in the logs related to this. Since it only happens on the production server, I'm suspicious that it is a server config issue.

Has anyone seen this kind of behavior before or can offer any advice on how to proceed?

Greg
  • 11
  • 2
  • This is most likely a character encoding mismatch somewhere in your setup. – Tero Kilkanen Mar 01 '17 at 20:10
  • Thanks. I had that thought as well. I've checked in my httpd.conf file and the default charset there is set to UTF-8. PHP is also reporting it's charset is set to UTF-8. But I'll definitely keep looking. – Greg Mar 01 '17 at 21:21
  • Do you have a misbehaving web application firewall? – Michael Hampton Mar 06 '17 at 23:33
  • The site is behind a web application firewall. Have you experienced problems with Drupal on a site with a WAF? – Greg Mar 08 '17 at 01:55
  • After looking into this, the WAF is causing the issue. We're making some changes now to resolve this. Thanks for pointing me in the right direction. If you want to post this as an answer, I'll mark it as accepted. – Greg Mar 09 '17 at 15:02

1 Answers1

0

Apostrophe and semicolon are reserved HTML characters. Are you using a Drupal block that auto-converts reserved characters? If the content block presents plain text as plain text without taking HTML reserved characters in account, you get problems.

You're getting a 303 probably because if Drupal can't properly interpret content it will redirect to an error page which I bet you don't have set up.

JimS
  • 1
  • 2
  • No blocks that autoconvert characters like that. The 303 is the response is when the content saves correctly. I get a 302 when the save fails. – Greg Mar 08 '17 at 01:58