Support » Fixing WordPress » Can’t Publish My Word Press Regarding This Error !

  • Hello , My 1st Post over here 🙂

    After some modification to my index.php template , When I try to publish an article I got this message :

    Database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 3]
    SELECT category_id, cat_name, category_nicename, category_description, category_parent FROM wp_categories, wp_post2cat WHERE wp_post2cat.category_id = cat_ID AND wp_post2cat.post_id =

    Warning: Invalid argument supplied for foreach() in /home/algazlan/public_html/wp-includes/template-functions-category.php on line 90
    � @

    It was just perfect before I modify the template !

    Any suggestion?

    Website :


Viewing 15 replies - 1 through 15 (of 17 total)
  • Yeah, like I spoke your language 🙂 I can’t even guess the meaning in your website. If it still gives you error, then start over with the original index.php

    Can we please see the coding of the lines you have changed so we can see what is wrong?

    Thanks in Advance

    Source Code :


    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”>
    <html xmlns=”” dir=”rtl” lang=”ar” xmlns:v=”urn:schemas-microsoft-com:vml” xmlns:o=”urn:schemas-microsoft-com:office:office” xmlns:(null)0=”″>

    <head profile=”″>
    <title> نايÙ? بن علي القزلان , يوميات على الانترنت </title>

    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
    <meta name=”generator” content=”WordPress 1.2.2 يوميات Ùˆ أحدات , أسطرها بعÙ?وية على موقعي الشخصي , Ùˆ أطرحها للنقاش مع الآخرين” /> <!– leave this for stats –>

    <link rel=”stylesheet” href=”” type=”text/css” media=”screen” />

    <style type=”text/css” media=”screen”>

    /* To accomodate differing install paths of WordPress, images are referred only here,
    and not in the wp-layout.css file. If you prefer to use only CSS for colors and what
    not, then go right ahead and delete the following lines, and the image files. */

    body { background: url(“”); } #page { background: url(“”) repeat-y top; border: none; } #header { background: url(“”) no-repeat bottom center; }
    #footer { background: url(“”) no-repeat bottom; border: none;}

    /* Because the template is slightly different, size-wise, with images, this needs to be set here
    If you don’t want to use the template’s images, you can also delete the following two lines. */

    #header { margin: 0 !important; margin: 0 0 0 1px; padding: 1px; height: 198px; width: 758px; }
    #headerimg { margin: 7px 9px 0; height: 192px; width: 740px; }
    /* END IMAGE CSS */

    /* To ease the insertion of a personal header image, I have done it in such a way,
    that you simply drop in an image called ‘personalheader.jpg’ into your /images/
    directory. Dimensions should be at least 760px x 200px. Anything above that will
    get cropped off of the image. */

    #headerimg { background: url(‘’) no-repeat top;}


    <link rel=”stylesheet” type=”text/css” media=”print” href=”” />
    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”” />
    <link rel=”pingback” href=”” />

    <link rel=”archives” title=”مارس 2005″ href=”″ />

    <meta name=’ICBM’ content=”0, 0″ />
    <meta name=’DC.title’ content=”” />
    <meta name=’geo.position’ content=”0;0″ >
    <link rel=”File-List” href=”index_files/filelist.xml”>

    <!–[if !mso]>
    v\:* { behavior: url(#default#VML) }
    o\:* { behavior: url(#default#VML) }
    .shape { behavior: url(#default#VML) }
    <![endif]–><!–[if gte mso 9]>
    <xml><o:shapedefaults v:ext=”edit” spidmax=”1027″/>
    <div id=”page”>

    <div id=”header”>
    <div id=”headerimg”>
    <div class=”يوميات Ùˆ أحدات , أسطرها بعÙ?وية على موقعي الشخصي , Ùˆ أطرحها للنقاش مع الآخرين”> </div>
    <hr />

    <div id=”content” class=”narrowcolumn”>

     <div class=”post”>
    <h2 id=”post-3″>تجربة لبناء مدونة عربية خالصة !!</h2>
    <small>10 مارس 2005 <!– by نايÙ? القزلان –></small>

    <div class=”entry”>


    <p class=”postmetadata”>كتب Ù?ÙŠ القسم يوميات | * | لا ردود »

    <rdf:RDF xmlns:rdf=””
    <rdf:Description rdf:about=”″
    dc:title=”تجربة لبناء مدونة عربية خالصة !!”
    trackback:ping=”″ />
    </rdf:RDF> –>

    <div class=”navigation”>
    <div class=”alignleft”></div>
    <div class=”alignright”></div>


    <div id=”sidebar”>

      <!– Author information is disabled per default. Uncomment and fill in your details if you want to use it. –>

    • <h2 style=”text-align: center”>نبذة</h2>
      <p style=”text-align: center”><font color=”#0066CC”>نايÙ? بن علي القزلان</font>
      <p style=”text-align: center”><font color=”#0066CC”>هندسة حاسب آلي</font>
      <p style=”text-align: center”><font color=”#0066CC”>جماعة الملك Ù?هد للبترول والمعادن</font>
      <p style=”text-align: center”>.  .  .  .  . 
      .  .  .  .  .  .  .
      <h2 style=”text-align: center”>الأرشيÙ?</h2>

      <h2 style=”text-align: center”>أقسام</h2>

      <h2 style=”text-align: center”>روابط</h2>

  • <form method=”get” id=”searchform” action=”/index.php”>
    <input type=”text” value=”” name=”s” id=”s” />
    <input type=”submit” id=”searchsubmit” name=”Submit” value=”بحث” />


  • </div>

    <!–[if gte vml 1]><v:rect id=”_x0000_s1026″
    z-index:1′ filled=”f” fillcolor=”none” stroked=”f” strokecolor=”none”>
    <table cellspacing=”0″ cellpadding=”0″ width=”100%” height=”100%” id=”table1″>
    <td align=”center”>
    <marquee direction=”right” onmouseover=”this.stop()” onmouseout=”this.start()” style=”font-family: Tahoma; font-size: 8pt; color: #FFFFFF” width=”80%” scrollamount=”4″ scrolldelay=”85″>المدونة تعمل تجريبياً , أسعد باستقبال الاقتراحات والاستÙ?سارات على بريدي :</marquee></td>
    </v:rect><![endif]–><![if !vml]><span style=’mso-ignore:vglayout;position:
    width=479 height=28 src=”index29_files/image001.gif” alt=”Text Box: ” v:shapes=”_x0000_s1026″></span><![endif]>

    <hr />
    <div id=”footer”>

    <font color=”#0066CC”>يستخدم نايÙ? القزلان</font>
    WordPress 1.2.2  || 
    <font color=”#0066CC”>جميع ما يرد Ù?ÙŠ هذه المدونة حق مشاع للجميع</font>
    خلاصات المواضيع (RSS).
    <!– Spawned in 0.029 seconds. –>
    تصميم: Michael Heilemann.



    Regards Guyz

If you switch to Classic Theme, do you still get an error when publishing?

Guyz , Here you go 🙂

the full template file :

Could some one check it plz?


Answer my question first, would you?

If you switch to Classic Theme, do you still get an error when publishing?

alphaoide , Thanks Nope I can publish normally 🙂

But I wanna use this theme 😀


I was expecting that it would break for any theme. It just don’t make sense how admin functionality affected by certain active theme. It’ll be hard to debug. I’ll take a look at it ’cause this sound interesting if indeed your theme causes the error in publishing functionality.

I replaced my index.php with yours and I don’t see any error of any sort. Make sure you didn’t accidently modify non-theme files.

MATE alphaoide
Mind if I gave u my account to try?

Feed me with ur e-mail on Naif824 at hotmail dot com


No more eroors

but try to publish a new thread

you cant !

the problem exactly is :

When I click publish , it keep the article as a draft

i have 10 drafts now with no publish at all 🙂

any idea?

I have no problem whatsoever with your index.php; everything gets published.

what’s your user level? bump it up


Any help?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Can’t Publish My Word Press Regarding This Error !’ is closed to new replies.