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

Exporting Installed Themes and reimporting causes corrupt Error #4766

Open
FuckingToasters opened this issue Oct 17, 2023 · 3 comments
Open
Labels
s:feedback Status: Feedback. Further information/input needed

Comments

@FuckingToasters
Copy link

Full Error (shown in an red box)

The following errors were encountered:

MyBB could not find the theme with the file you uploaded. Please check the file is the correct and is not corrupt.

The Theme File isn't corrupt as the same issue happen when i import the theme again, export it and try to import the exported version.

Would be nice if anyone could help me there.

@dvz
Copy link
Contributor

dvz commented Oct 29, 2023

Does the same happen for other themes, or MyBB installations? Can you attach the theme package here?

@FuckingToasters
Copy link
Author

Does the same happen for other themes, or MyBB installations? Can you attach the theme package here?

The Theme i'm using is a paid one which goes by the name "Emerald Extended". I don't have the permission to distrubute it.

@vanessasickles
Copy link

While I'm not sure about the cause of the issue, I was able to consistently replicate it on my sites that use myBB as well. I have not tried on a fresh install, and will see if I can do that soon.

Essentially, I'd export a theme out of the myBB admin panel, and immediately be unable to re-import it. I would consistently get the above error mentioned. After inspecting the XML file, I found a consistent set of fixes for when I encountered the issue.

For those searching, this is the fix that has worked every time for me:

Steps to Fix

  1. Export the theme as usual
  2. Open the XML file it gives you in a text editor
  3. Remove the line that says <?xml version="1.0" encoding="UTF-8"?>, and remove any blank lines that come before the starting <theme tag.
  4. Scroll to the very bottom of the file. You will find an unfinished closing tag: </the. Fix it to </theme>
  5. Save the XML file
  6. Import the Theme. Will work flawlessly now

Observations

Consistent issues with the XML files were:

  • Importer did not like the prepended <?xml> tag
  • The ending "" was consistently getting cut off to "</the"

@dvz dvz added the s:feedback Status: Feedback. Further information/input needed label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:feedback Status: Feedback. Further information/input needed
Projects
None yet
Development

No branches or pull requests

3 participants