MyBB Community Forums

Full Version: NEWBIE: Trying to upload XML file via site. No FTP access.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to create a new theme. I hand-edited the XML file with all of the Style-sheet info. I have Admin rights to use the built-in Theme Editor, but I don't have FTP access, so I must do everything via the web interface.

When I try to upload the XML file, I get the following message:

[Image: mybb-no-theme.jpg]

I'm experienced editing CSS files, and I started with the template of a currently installed theme, so the file should be fine.

What am I doing wrong? TIA

PS: Trying to install entire downloaded Zipped themes gives the same message.
Do you mean you've edited the XML file directly? It's likely there's a syntax error in the XML, it would have been easier to import the theme first and make edits in the editor in the ACP.

Upload the file here to validate it: https://www.xmlvalidation.com/
(2023-01-30, 06:36 PM)Matt Wrote: [ -> ]Do you mean you've edited the XML file directly? It's likely there's a syntax error in the XML, it would have been easier to import the theme first and make edits in the editor in the ACP.

Upload the file here to validate it: https://www.xmlvalidation.com/

Thx for the reply.

The XML checker you linked to reports one error, but it's a false error regarding a missing closing tag. The closing tag is there and the "error" is on a line I didn't edit (this is based on an installed/working theme.)

1888:38 Element type "stylesheet" must be followed by either attribute specifications, ">" or "/>".

        <stylesheet name="onlinetoday.css" 0version="1000"><![CDATA[.avatarep_online_row{text-align:center;width:100px;display:inline-block;padding:0px 4px;}
.avatarep_online_row_nor{width:auto;display:inline-block;padding:0px 2px;}
.avatarep_image{display:block;width:80px;height:60px;border: 1px solid #cacaca; background: #fff;padding:8px;border-radius:4px;}
.avatarep_span{text-align:center;}
.ot_offline{border-left: 4px solid #bf5656;}
.ot_online{border-left: 4px solid #399c3a;}
@media screen and (max-width:650px){
.avatarep_span{display:none;}
.avatarep_online_row_nor{width:auto;display:inline-block;}
.avatarep_span_nor{font-size: 8px;}
.avatarep_image{width:28px;height:20px;padding:3px;border-radius:2px;}
.avatarep_online_row{width:30px;}
.ot_offline{border-left: 2px solid #bf5656;}
.ot_online{border-left: 2px solid #399c3a;}
}]]>
        </stylesheet>


(As you can see, the close tag is there, just far away.)

So, uploading an XML file directly should work? Then something else must be going on. Thx.
(2023-01-30, 06:36 PM)Matt Wrote: [ -> ]Do you mean you've edited the XML file directly? It's likely there's a syntax error in the XML, it would have been easier to import the theme first and make edits in the editor in the ACP.
Upload the file here to validate it: https://www.xmlvalidation.com/

Thx for the reply.

The XML checker you linked to reports one error, but it's a false error regarding a missing closing tag. The closing tag is there and the "error" is on a line I didn't edit (this is based on an installed/working theme.)

1888:38 Element type "stylesheet" must be followed by either attribute specifications, ">" or "/>".

(This board won't allow me to post the code block. Too long?)

So, uploading an XML file directly should work? Then something else must be going on. Thx.
Your other post got queued for moderation for some reason.

It's probably a valid error, as it will either by valid syntax or it won't and if it's flagging it it would have failed a parser test. MyBB uses PHP's XML parser functions to import the theme, if that doesn't detect it as valid XML then it won't work. Can you upload it here and I can verify.
0version="1000"
should be:
version="1000"
(2023-01-30, 09:15 PM)SvePu Wrote: [ -> ]
0version="1000"
should be:
version="1000"

I did wonder if it was that, just tried it with a theme I exported and that seems to be the issue yeah.
Thx. I saw that but didn't question it b/c (as I noted), it's a copy of a working theme.

Made the change and it uploaded. Thx.
Most likely just an accidental key press while it was open or something.