'Preview Post' goes crazy with an attached image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fpgeeks
    New Member
    • Feb 2014
    • 1
    • 4.2.X

    'Preview Post' goes crazy with an attached image

    When I click 'Preview Post' with any number of attached images I get this error at the top of the page:
    Warning: preg_match(): Compilation failed: invalid range in character class at offset 23 in [path]/includes/class_wysiwygparser.php on line 481
    and the area below the message editor box turns into this: If I add an image by clicking the 'Insert Image' button and pasting in a link to the image, then click 'Preview Post' I don't get any error. Can someone please help me fix this?
    Attached Files
  • Romamo
    New Member
    • Oct 2008
    • 5
    • 4.1.x

    #2

    Fix
    includes/class_wysiwygparser.php on line 481
    Move underscope symbol (_) to the last position of the character's range (twice).

    Comment

    • stuarttunstall
      Senior Member
      • Feb 2004
      • 403
      • 4.2.X

      #3
      Hi

      I have this issue, can someone please explain to a novice like me what I need to do, I do not understand what this means

      Warning: preg_match() [function.preg-match]: Compilation failed: invalid range in character class at offset 23 in [path]/includes/class_wysiwygparser.php on line 458
      What do I need to move?

      Stuart
      Last edited by stuarttunstall; Mon 28 Jul '14, 11:42am.

      Comment

      • stuarttunstall
        Senior Member
        • Feb 2004
        • 403
        • 4.2.X

        #4
        Think I have worked it out made changed and it seems to have worked

        Comment

        • RobertoMuggli
          New Member
          • Jun 2011
          • 24
          • 4.1.x

          #5
          Hello Stuart!

          I have the same problem but I cannot understand what I have to move where.

          Do you still remember what you did? I wish the page on the bug tracker were clearer, because I have the same error on line 457 and on that line I can only find:

          protected function parse_matched_tags($text)

          There are no underscores (or character ranges for that matter)...

          Thanks!
          Roberto




          EDIT! I'm sorry I'm not a smart person LOL. Disregard my text above.

          Just for reference, the line with the error looks like this:

          if (preg_match('#attachment.php\?attachmentid=(\d+)#si', $img_url, $matches) AND preg_match('#class=(\'|"|)([a-z0-9_-\s]+)?\s*previewthumb\s*([a-z0-9_-\s]+)?(\\1)#si', $fullurl))


          Is it correct that the both ranges [a-z0-9_-\s] must become [a-z0-9-_\s] ?
          Last edited by RobertoMuggli; Mon 4 Aug '14, 11:30pm.

          Comment

          • Raptor
            Senior Member
            • Jan 2001
            • 224
            • 4.2.x

            #6
            this fixed the bug for me
            Digital-Forums: www.digital-forums.com | CK3 Games: www.ck3.co.uk

            Comment

            • vB-Tr
              Senior Member
              • Apr 2010
              • 157
              • 4.0.0

              #7
              who can help me ?

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...