رفتن به مطلب

مشكلات و سوالات رفع ارورهاي قالب در W3C


Saeed Fard

پست های پیشنهاد شده

یعنی چی در همه موارد باید رعایت بشه ؟! این یه کد تو فایل ایندکس قالب هستش که من اونو تغییر میدم و همه با هم تغییر میکنند !!!!!! غیر از اینه ؟

لینک به ارسال

یعنی چی در همه موارد باید رعایت بشه ؟! این یه کد تو فایل ایندکس قالب هستش که من اونو تغییر میدم و همه با هم تغییر میکنند !!!!!! غیر از اینه ؟

تمام کد های استفاده شده (...,div , h1,h2,h3,h4) در تمام فایل های پوستتون index.php,single.php,archive.php و ... باید این قانون را رعایت کنید تا این نوع خطاهای مربوطه حذف بشه.

  • امتیاز 2
لینک به ارسال

سلام

مشکل زیر را سایت http://validator.w3.org از قالب گرفته است که مربوط به بخش نظرات می شود. برای رفع این مشکل باید چه کار کنم؟


Line 282, Column 27: The name attribute is obsolete. Consider putting an id attribute on the nearest container instead.
<a name="comment-204"></a>

لینک به ارسال

سلام

سایت http://validator.w3.org

این اخطار رو میده:

Sorry, I am unable to validate this document because on line 112 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

The error was: utf8 "\xD9" does not map to Unicode

لاین 112 مربوط می شه به فایل slider که پیوست کردم

مشکلش از کجاست؟

slider.php

لینک به ارسال

سلام

مشکل زیر را سایت http://validator.w3.org از قالب گرفته است که مربوط به بخش نظرات می شود. برای رفع این مشکل باید چه کار کنم؟


Line 282, Column 27: The name attribute is obsolete. Consider putting an id attribute on the nearest container instead.
<a name="comment-204"></a>

خاصیت name رو از تگ a حذف کنید.

سلام

سایت http://validator.w3.org

این اخطار رو میده:

Sorry, I am unable to validate this document because on line 112 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

The error was: utf8 "\xD9" does not map to Unicode

لاین 112 مربوط می شه به فایل slider که پیوست کردم

مشکلش از کجاست؟

مشکل از انکد و یا از کاراکترهای یونیکد پوسته شماست.

توی اسلایدر بجای تابع substr از mb_substr و بجای strlen از mb_strlen استفاده کنید.

  • امتیاز 2
لینک به ارسال

توی اسلایدر بجای تابع substr از mb_substr و بجای strlen از mb_strlen استفاده کنید.

با این کار مشکل برطرف شد

چه فرقی داره substr با mb_substr

؟

این mb_ چه کاری انجام میده؟

لینک به ارسال

با این کار مشکل برطرف شد

چه فرقی داره substr با mb_substr

؟

این mb_ چه کاری انجام میده؟

توضیحات این تابع در:


http://ir.php.net/mb_substr

  • امتیاز 3
لینک به ارسال

مشکل از این هست که توابع اصلی وردپس با یونیکد مشکل دارن و کاراکترهای باقیمونده مشکل زا میشن.

اما توابع جایگزین برای یونیکد هستن و مشکلات فوق رو ندارن.

  • امتیاز 3
لینک به ارسال

این مشکل را چگونه حل کنم؟


Error Line 422, Column 24: The for attribute of the label element must refer to a form control.
<label for="comment">نظر شما</label>

لینک به ارسال

شما لیبل قرار دادی اما به اون ورودی فرمتون اختصاص داده نشده.

الان شما input با اسم comment در فرم دارید؟

لینک به ارسال

شما لیبل قرار دادی اما به اون ورودی فرمتون اختصاص داده نشده.

الان شما input با اسم comment در فرم دارید؟

با اسم کامنت خیر اما چنین کدهایی وجود دارد


<input type="hidden" name="comment_post_ID" value="1115" />
<input type='hidden' name='comment_post_ID' value='1115' id='comment_post_ID' />
<input type='hidden' name='comment_parent' id='comment_parent' value='0' />

لینک به ارسال

با name منظورم این هست. مثلا:

name="comment_post_ID"


<input type="hidden" name="comment_post_ID" value="1115" />
<input type='hidden' name='comment_post_ID' value='1115' id='comment_post_ID' />
<input type='hidden' name='comment_parent' id='comment_parent' value='0' />

بله مثل اینکه وجود داره باید چکارشون کنم؟

ویرایش شده توسط dnojir
لینک به ارسال

ببینید مثلا اگر لیبلی دارید که for روی test ست شده باید براش input یی با name="test" و همچنین id="test" قرار بدید.

  • امتیاز 2
لینک به ارسال
  • 1 ماه بعد...

اقا من اون تاپیکتون رو خوندم رفتم به همون سایت و ارور هارو گرفتم ... منتهی هیچی نفهمیدم ... نفهمیدن منظورم اینه که بهم گفت شوما 20 تا ارور داری ... ولی هرچی بالا پایین کردم دیدم نمیتونم تشخیص بدم چه ارور هایی هست ...

این صفحه ارور هام هست http://validator.w3.org/check?uri=http%3A%2F%2Fwww.zabbin.ir%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

اگه یه مرد پیدا شه فقط بگه مثلا این چه ارورریه ( Line 366, Column 11: ID "headerc" already defined) بقیش رو خودم از رو نوشته های دوسته خوبمون درست میکنم ////

لینک به ارسال

اگه یه مرد پیدا شه فقط بگه مثلا این چه ارورریه ( Line 366, Column 11: ID "headerc" already defined) بقیش رو خودم از رو نوشته های دوسته خوبمون درست میکنم ////

سلام

در مرد بودن دوستان که شک نکنید همه مردن و با معرفت. ;)

این خطا مربوط به استفاده کردن بیش از 1 بار آی دی headerc در کدهای شماست و هر آی دی فقط 1 بار مجاز به استفاده در صفحه است.

view-source بزنید و جستجو کنید مشخصه.

چند موردی از خطاها مربوط به استفاده نکردن صحیح از تگ <ul> قبل از تگ <li> هست.

مثال:


<ul>
<li>گزینه اول</li>
<li>گزینه دوم</li>
<li>گزینه سوم</li>
</ul>

  • امتیاز 4
لینک به ارسال
  • 2 هفته بعد...

باسلام

من اين ارور را دريافت كردم:

error.pngLine 1, Column 266: document type does not allow element "h1" here; assuming missing "object" start-tag

…ntent="text/html; charset=UTF-8" /><h1><title>وبلاگ نویسان | مرجع وبلاگ نويسان…

آيا بايد تگh1 را درون title استفاده كنم؟(اگر چنين كاري بكنم عنوان سايتم كلا خراب ميشه!)

در ضمن اين كدي هست كه در قالب استفاده ميشه:


<h1><title><?php global $page, $paged; wp_title( '', true, 'right' ); bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description"; ?></title>
</h1>

لینک به ارسال

باسلام

من اين ارور را دريافت كردم:

آيا بايد تگh1 را درون title استفاده كنم؟(اگر چنين كاري بكنم عنوان سايتم كلا خراب ميشه!)

در ضمن اين كدي هست كه در قالب استفاده ميشه:


<h1><title><?php global $page, $paged; wp_title( '', true, 'right' ); bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description"; ?></title>
</h1>

تگ title فقط برای نمایش عنوان در مرورگر هست و تاثیری در خروجی صفحه نداره!

و نباید درون تگی به جز head قرار بگیره

  • امتیاز 4
لینک به ارسال

خوب من اين تگ را درون تگ head استفاده ميكنم ولي w3c چرا بهش گير داده؟

شما دارید داخل تگ h1 استفاده میکنید

خطایی که گرفته شده به خاطر h1 هست

  • امتیاز 3
لینک به ارسال

درست شد،در مورد اين ارور ميتونيد كمك كنيد

Line 1, Column 6253: there is no attribute "placeholder"

…ass="searchtext" name="s" placeholder="جست جو " value="" /></form></div></div…

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page

فاصله جست و جو را با " از بين بردم ولي تاثيري نداشت!

لینک به ارسال

درست شد،در مورد اين ارور ميتونيد كمك كنيد

Line 1, Column 6253: there is no attribute "placeholder"

…ass="searchtext" name="s" placeholder="جست جو " value="" /></form></div></div…

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page

فاصله جست و جو را با " از بين بردم ولي تاثيري نداشت!

doctype را به صورت html5 قرار دهید:

<!DOCTYPE html>

در فایل header

  • امتیاز 3
لینک به ارسال

من اين كد را با ايني كه عرض كرديد جايگزين كردم،درسته؟


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

لینک به ارسال

بله

کدی که پارسا داده برای نسخه 5 و کد شما برای نسخه قبلی هست.

  • امتیاز 2
لینک به ارسال
  • asadiy4n این مورد را قفل کرد موضوع
مهمان
این موضوع برای عدم ارسال قفل گردیده است.
×
×
  • اضافه کردن...