I'm trying to input some content into the main body of a node where the content type includes xbbcode. When I use a tag with an attribute value and save or preview the node, instead of saving or showing me a preview, I'm sent back to the create/edit content screen as it was before I started typing.

So if my text includes [url]text[/url] everything happens as it is supposed to. But if it includes [url=foo.com]text[/url], then the save and preview buttons simply reset the form to what it was when I started. The same thing happens if I am using a named attribute.

Comments

cburschka’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Most fatal errors would just result in a blank page or an error message...

If this happens with all tags, then the common factor would be the attribute-parsing function:


function _xbbcode_parse_attrs($string) {
  preg_match_all('/' . XBBCODE_RE_ATTR . '/', $string, $assignments, PREG_SET_ORDER);
  $attrs = array();
  foreach ($assignments as $assignment) {
    $attrs[$assignment['key']] = $assignment['value'];
  }
  return $attrs;
}

But there really isn't anything that could cause an error here. If the XBBCODE_RE_ATTR constant is not defined, there would be an E_NOTICE and the pattern would literally become /XBBCODE_RE_ATTR/, which is still a valid expression. Since it wouldn't be in the text, $assignments would be empty and nothing else would happen.

I'd recommend upgrading to 7.x-1.6 and looking at the error logs (both in the Drupal site and in /var/log/apache2/error.log) if it happens again...

cburschka’s picture

Component: Code » Core
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)