1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Without AutoValidator, Images May Not Post

Discussion in 'Resolved Bug Reports' started by pegasus, Feb 3, 2015.

  1. pegasus

    pegasus Well-Known Member

    This is particularly a problem for add-ons that wish to use the editor, but which may not need AutoValidator functionality.

    It would appear that images entered into the editor via the toolbar button are not automatically updated into the "actual" editor content that gets submitted. However, typing other text seems to update the actual contents, so it becomes necessary to type something else after using the image toolbar button.

    Succinctly: If the insert-image toolbar button was the last editor action, and the editor form does not have the "AutoValidator" class, then the image will not be posted (check the POST data).

    Without using an add-on, you can test this very easily:
    1. Create a new post with some text in it.
    2. Edit the "post_edit" template in the Admin CP and remove the "AutoValidator" class.
    3. Edit the post you made before. Click "More Options" to go to the full editor.
    4. Use the Insert Image toolbar button to put an image in the post.
    5. The image should appear correctly in the editor.
    6. Submit the edit.
    7. The image does not appear in the "updated" post.

    It does not make any sense for the ability to insert images into posts to be tied to the AutoValidator class. Even though it doesn't occur in vanilla XenForo, this can cause problems for style and add-on authors. Thus this should be considered a bug.

    Originally reported and investigated here: https://www.vaultwiki.org/issues/4169/
  2. Mike

    Mike XenForo Developer Staff Member

    I made a few changes to deal with this, including syncing the value after doing some stuff in the modals. But more significantly, it now auto-syncs on form submit.
    pegasus likes this.

Share This Page