Modulshop - Eine große Auswahl an neuen und hilfreichen Modulen für die modified eCommerce Shopsoftware
Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Validierungshilfe

    Enzo999

    • Neu im Forum
    • Beiträge: 18
    Validierungshilfe
    am: 22. Februar 2012, 18:02:34
    Ich habe eine knifflige Aufgabe. ich bin daran mein Theme annähernd valid zu machen. nun sagt der validator folgendes
    Zitat
    Line 821, Column 195: document type does not allow element "a" here

    …ars=yes, resizable=yes, height=400, width=400\'))">(exkl. Versandkosten)</a>');



    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

    Anbei mein Aktueller Quellcode mit Markierung des erwähnten Fehlers.
    Code: Javascript  [Auswählen]
    function getShippingLink() {
                    return ' '.SHIPPING_EXCL.'<script language="javascript" type="text/javascript">
    document.write(\'<a href="javascript:newWin=void(window.open(\\\''
    .xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS).'\\\', \\\'popup\\\', \\\'toolbar=0, scrollbars=yes, resizable=yes, height=400, width=400\\\'))">'.SHIPPING_COSTS.'</a>\');
    </script>
    <noscript><a href="'
    .xtc_href_link(FILENAME_POPUP_CONTENT,'coID='.SHIPPING_INFOS).'targ[b]et=">'.SHIPPI[/b]NG_COSTS.'</a></noscript>';

            }
     

    Wenn ich die Autokorrektur des Validators übernehme erhalte ich nur noch mehr Fehlermeldungen....

    Linkback: https://www.modified-shop.org/forum/index.php?topic=18408.0

    Enzo999

    • Neu im Forum
    • Beiträge: 18
    Re: Validierungshilfe
    Antwort #1 am: 22. Februar 2012, 18:05:00

    Ich habe eine knifflige Aufgabe. ich bin daran mein Theme annähernd valid zu machen. nun sagt der validator folgendes
    Zitat
    Line 821, Column 195: document type does not allow element "a" here

    …ars=yes, resizable=yes, height=400, width=400\'))">(exkl. Versandkosten)</a>');



    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

    Anbei mein Aktueller Quellcode mit Markierung des erwähnten Fehlers.
    Code: Javascript  [Auswählen]
    function getShippingLink() {
                    return ' '.SHIPPING_EXCL.'<script language="javascript" type="text/javascript">
    document.write(\'<a href="javascript:newWin=void(window.open(\\\''
    .xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS).'\\\', \\\'popup\\\', \\\'toolbar=0, scrollbars=yes, resizable=yes, height=400, width=400\\\'))">'.SHIPPING_COSTS.'</a>\');
    </script>
    <noscript><a href="'
    .xtc_href_link(FILENAME_POPUP_CONTENT,'coID='.SHIPPING_INFOS).'target=">'.SHIPPING_COSTS.'</a></noscript>';

            }
     

    ).'target=">'.SHIPPINWenn ich die Autokorrektur des Validators übernehme erhalte ich nur noch mehr Fehlermeldungen....

    noRiddle (revilonetz)

    • Experte
    • Beiträge: 13.989
    • Geschlecht:
    Re: Validierungshilfe
    Antwort #2 am: 22. Februar 2012, 18:09:44
    Hallo ramonpose.

    1. Du kannst deine Posts 30 min. lang editieren und brauchst nicht nochmal alles schreiben, wenn du was vergessen hast.
    2. Bette mal die a-tags in p-tags ein. Wenn du nach XHTML validieren willst wäre das wichtig.
    Kannst du mal den ausgegebenen Quelltext posten anstatt den php-code ?

    Gruß,
    noRiddle

    Nachtrag:
    Übrigens, wo erscheint der Fehler ?, in product_info oder product_listing oder ....

    Modulfux

    • Experte
    • Beiträge: 3.590
    • Geschlecht:
    Re: Validierungshilfe
    Antwort #3 am: 22. Februar 2012, 18:17:43
    Eine weitere Klinke ist diese Passage
    Code: PHP  [Auswählen]
    target="

    Dort sollte das target-Attribut auch richtig befüllt sein, z.B.
    Code: PHP  [Auswählen]
    target="_blank"
     

    Gruß
    Ronny

    Enzo999

    • Neu im Forum
    • Beiträge: 18
    Re: Validierungshilfe
    Antwort #4 am: 22. Februar 2012, 18:19:13
    # document.write('<a href="javascript:newWin=void(window.open(\'http://www.hojac.ch/de/popup/Versandkosten.html\', \'popup\', \'toolbar=0, scrollbars=yes, resizable=yes, height=400, width=400\'))">(exkl. Versandkosten)</a>');

    der Fehler erscheint in der product listing. aber die Generierung erfolgt in der main.php wenn ich das richtig verstanden/gefunden habe....und dort wird meiner Logik nach auch der andere link generiert...?!?!

    noRiddle (revilonetz)

    • Experte
    • Beiträge: 13.989
    • Geschlecht:
    Re: Validierungshilfe
    Antwort #5 am: 22. Februar 2012, 18:29:19
    Ich glaube nicht, daß es mit der Generierung zu tun hat sondern mit deinem HTML-Code in /templates/DEIN_TEMPLTE/product_listing/product_listing.html

    Wir wär's denn, wenn du mal wirklich den HTML-Code (wie er ausgegegen wird oder wie er in o.g. Datei steht) postest ?
    Ausserdem habe ich das Gefühl es handelt sich um einen xt:Commerce- und nicht um modified eCommerce Shopsoftware-Shop !??

    noRiddle

    Enzo999

    • Neu im Forum
    • Beiträge: 18
    Re: Validierungshilfe
    Antwort #6 am: 22. Februar 2012, 18:39:54
    ich versteh das nicht. aber wenn du weisst wovon du sprichst...!

    Code: XML  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="index"}

    {if $CATEGORIES_IMAGE}<div class="promoMain"><img src="{$CATEGORIES_IMAGE}" alt="{$CATEGORIES_NAME}" /><br /></div>{/if}
    {if $CATEGORIES_HEADING_TITLE}
      <h1>{$CATEGORIES_HEADING_TITLE}</h1>
    {elseif $ADVANCED_SEARCH_HEADER}
      <h1>{$ADVANCED_SEARCH_HEADER}</h1>
    {else}
      <h1>{$CATEGORIES_NAME}</h1>
    <div class="hrproductpreview"></div>
    {/if}
    {if $MANUFACTURER_DROPDOWN}{$MANUFACTURER_DROPDOWN}{/if}
    <br />
    <div align="center">
    {foreach name=aussen item=module_data from=$module_content}

       {php} $col++;
      {/php}


      <div class="listingbox">
      <div class="listing" align="center"><a href="{$module_data.PRODUCTS_LINK}">{$module_data.PRODUCTS_NAME}</a>{if $module_data.PRODUCTS_TIP}<img class="productImageTip" src="images/labels/{$module_data.PRODUCTS_TIP}" alt="{$module_data.PRODUCTS_TIP}">{/if}</div>
      <div class="listing_body">
      <div class="listing_img">{if $module_data.PRODUCTS_IMAGE}
        <a href="{$module_data.PRODUCTS_LINK}"><img src="{$module_data.PRODUCTS_IMAGE}" alt="{$module_data.PRODUCTS_NAME}" /></a>
      {/if}</div>
      <div class="listing_price"><span class="price"><b>{$module_data.PRODUCTS_PRICE}</b></span><br/>
        {$module_data.PRODUCTS_TAX_INFO}<br/>{$module_data.PRODUCTS_SHIPPING_LINK}</div>
        </div>
        <div class="listing_bottom"><a href="{$module_data.PRODUCTS_LINK}"><img src="{$tpl_path}buttons/german/button_product_more.gif" alt=""/></a></div>
    </div>

    {php}
      if ($col>=2) {
      $col=0;
      echo '';
      }
      {/php}
    {/foreach}
    </div>
    {$NAVIGATION}

    hier wird ja der generierte link nur eingeführt mit dem modulaufruf....

    noRiddle (revilonetz)

    • Experte
    • Beiträge: 13.989
    • Geschlecht:
    Re: Validierungshilfe
    Antwort #7 am: 22. Februar 2012, 20:00:31
    Also das kann schonmal nicht als XHTML validieren, z.B.:
    Code: XML  [Auswählen]
    <div class="listing_price"><span class="price"><b>{$module_data.PRODUCTS_PRICE}</b></span><br/>
        {$module_data.PRODUCTS_TAX_INFO}<br/>{$module_data.PRODUCTS_SHIPPING_LINK}</div>
    Hier müsste <b> durch <strong> ersetzt werden und die Texte wie der Preis, Steuer und Versandkosten in einen <p>-tag eingebettet werden.

    Also sowas geht nicht
    Code: XML  [Auswählen]
    <div>
        Irgendein Text steht hier
    </div>

    sondern so
    Code: XML  [Auswählen]
    <div>
        <p>Irgendein Text steht hier<br />
            <span>Noch'n bisschen Text</span>
        </p>
    </div>

    oder so
    Code: XML  [Auswählen]
    <div>
        <ul>
            <li>Irgendein Text steht hier</li>
            <li>Und noch mehr Text</li>
        </ul>
    </div>

    Falls dein Code wo der Link generiert wird aus der /includes/classes/main.php kommt, hast du ja noch xt:commerce und nicht modified eCommerce Shopsoftware.
    dann kannst du das mit dem Validieren eh vergessen, wäre 'ne heiden Arbeit den zum Validieren zu bringen.
    Im Übrigen ist das Forum hier für modified eCommerce Shopsoftware und mehr wird auch nicht unterstützt...

    Gruß,
    noRiddle
    Managed Server
               
    anything