Tags in WP nicht valide

  • Ich habe nun (auch mit unterschiedlichen Themes) festgestellt, dass sobald man im geschriebenen Text die im Admin Bereich zur Verfügung gestellten Tags wie ul li ol nutzt, der Code nicht mehr valide ist.
    Warum ist das so?

    Welche Tags soll man denn für z.b Aufzählungen, Einrückungen, etc. verwenden?

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • Komisch. Selbst mit dem Standard Theme habe ich diese Fehler.

    Beispielsweise schreibe ich so etwas in meine Beitrag:

      Hier steht der austauschbare Test Text.


    Error Line 143 column 5: character data is not allowed here.

    Code
    [list=1]Hier steht der austauschbare Test Text

    You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a

    aragraph</p>) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).


    Error Line 143 column 110: end tag for "ol" which is not finished.

    Code
    ...Hier steht der austauschbare Test Text[/list]

    Most likely, You nested tags and closed them in the wrong order. For example

    [i]...</p> is not acceptable, as [i] must be closed before

    . Acceptable nesting is:

    ...</p>

    Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, <head> generally requires a <title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.

    Eine URL zum Anschauen kann ich leider noch nicht nennen, da Intranet Testserver.

  • Die Fehlermeldung sagt doch eigentlich alles aus, sogar was du beachten musst.
    Du darfst die [list=1] tags nicht einfach im Body Element drinstehen haben. Um dies zu Umgehen, schreibe deine Beiträge im Paragraph tag, sprich

    Dein Beitrag

      Deine Aufzählung

    </p>
    Und schon hast auch du validen Code ;-)

    Gruß Bionic

  • Schön wärs. jetzt hagelt es noch weitaus mehr Fehler. Wozu sind denn die Tags über dem Schreib Feld, wenn man sie nicht nutzen kann?

    Error Line 105 column 7: document type does not allow element "ol" here; missing one of "object", "ins", "del", "map", "button" start-tag.
    <

    Code
    [list=1]Hier steht der austauschbare Test Text


    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "

    " or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

    Error Line 105 column 8: character data is not allowed here.

    Code
    [list=1]Hier steht der austauschbare Test Text


    You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a

    aragraph</p>) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).

    Error Line 105 column 113: end tag for "ol" which is not finished.

    Code
    ...Hier steht der austauschbare Test Text[/list]

    Most likely, You nested tags and closed them in the wrong order. For example

    [i]...</p> is not acceptable, as [i] must be closed before

    . Acceptable nesting is:

    ...</p>

    Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, <head> generally requires a <title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.

    Error Line 106 column 4: document type does not allow element "ol" here; missing one of "object", "ins", "del", "map", "button" start-tag.

    Code
    [list=1]

    Error Line 107 column 0: character data is not allowed here.

    Code
    Hier steht der austauschbare Test Text

    Error Line 107 column 322: end tag for "ol" which is not finished.

    Code
    ... Hier steht der austauschbare Test Text[/list]</p>

    [/code]

  • doch ich schon;)

    Code
    [list=1][*]text
    [*]text2
    [/list]


    also einen Text gleich nach dem ol zu schreiben ist genauso falsch wie einen Text gleich nach einem ul zu schreiben
    beide brauchen dann den *Textumklammernden* li tag.


    lg
    Monika

  • Okay, nun habe ich es aufgrund Monikas Tipps wie folgt gemacht und nun ist es valide:

    Code
    <ul>
    	[*]Aufzählung 1
            [*]Aufzählung 2
    [/list]

    Vielen Dank!

    Wo ist denn der Unterscheid zwischen ol und ul ?

    Trotz allen muss man aber sagen, dass man es als reiner Redakteur recht schwer mit WP hat.
    Woher soll man wissen in welcher Reihenfolge man diese Tags wie und in welchem Fall setzen muss?

    Das ist bei einem phpbb irgendwie besser gelöst.

    Noch eine Frage: Wenn man einzelne Worte andersfarbig darstellen möchte, wie macht man das dann?

  • ol ergibt ein eListe mit
    1,
    2,3,4,

    ul eine ungeordnete Liste


    ja die Quicktags sind nicht einfach

    doch es gibt ja auch Editoren,
    guggste hier
    ich habe den aber noch nicht getestet...
    lg
    Monika

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!