Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.0]: XML Parsing Error when trying to preview posts #8452

Closed
Oldiesmann opened this issue Feb 8, 2025 · 4 comments · Fixed by #8427
Closed

[3.0]: XML Parsing Error when trying to preview posts #8452

Oldiesmann opened this issue Feb 8, 2025 · 4 comments · Fixed by #8427
Assignees
Labels
Milestone

Comments

@Oldiesmann
Copy link
Contributor

Basic Information

Clicking the Preview button either from the main post screen or the Quick Reply box results in an error. If you do it from the main post screen, it just sits there saying "Fetching preview...". If you do it from the Quick Reply box you get an XML Parse Error message in the browser (at least in Firefox)

Steps to reproduce

  1. Start a new post or a reply to an existing one
  2. Click the "Preview" button

Expected result

A preview of your post is displayed

Actual result

XML Parsing Error if using Quick Reply (at least in Firefox) or "Fetching preview..." instead of the preview, with errors in console

Version/Git revision

4e54200

Database Engine

All

Database Version

No response

PHP Version

8.3.4

Logs

Additional Information

Firefox error:
Image

Chrome error:
Image

Tested both locally and on a couple boards on my server. Same result.

@Sesquipedalian
Copy link
Member

Confirmed

@Sesquipedalian Sesquipedalian self-assigned this Feb 8, 2025
@Oldiesmann
Copy link
Contributor Author

Doing some more digging on this, if you change the GetOuputType method in Sources/Actions/Post2.php to always return an HTML output type, preview works from the quick reply, but the same issue still occurs when previewing from the post screen.

@Oldiesmann
Copy link
Contributor Author

Oldiesmann commented Feb 9, 2025

In addition to previews, anything that loads a list of members via AJAX is broken - mentions, sending PMs, adding a member as a moderator of a group... Same issue - XML parsing error. The browser's being told to expect XML but is getting HTML instead.

@Sesquipedalian
Copy link
Member

This was a bear to deal with. The fundamental issue was that #8395 introduced a situation where we were trying to check the properties of the current action object before that object had been instantiated.

Anyway, I've added fixes for this to #8427, because the fixes for this need to build on the other fixes already in that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants