Announcement

Collapse
No announcement yet.

style table error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] style table error

    Hello everyone,
    I'm facing a strange error in db. when I try to create a new style it always takes the id zero (styleid=0), and I get this error (you cannot assign main em>stylename to one of its branches ). but the style is created anyway. this is the case with creating a style without parents.
    if I create a child style, I dont get that error but the id will be set to zero too.

    and If I try to delete the new style with id=0 from admincp, I get and error says: there is no style with id=0. thought, it's still shown in admincp.

    I tried to use tools.php to repair the tables and the style, but it didn't work.
    I tried to run upgrade, but it didn't work either.

    repair table gives this note: Table does not support optimize, doing recreate + analyze instead
    after I create the style with id=0 I get mysql errors in all sections of "Styles and Templates":
    Warning: mysqli_query(): (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND t2.title IS NULL ORDER BY title, ordercontrol' at line 4 in ..../includes/class_core.php on line 1393
    Database error in vBulletin 4.2.2:

    Invalid SQL:

    SELECT t1.templateid, t1.title, INSTR(',0, -1,', CONCAT(',', t1.styleid, ',') ) AS ordercontrol, t1.styleid
    FROM template AS t1
    LEFT JOIN template AS t2 ON (t2.title=t1.title AND t2.styleid = -1)
    WHERE t1.styleid IN (0,) AND
    t2.title IS NULL
    ORDER BY title, ordercontrol;

    MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND
    t2.title IS NULL
    ORDER BY title, ordercontrol' at line 4
    Error Number : 1064
    Request Date : Tuesday, March 4th 2014 @ 01:01:29 PM
    Error Date : Tuesday, March 4th 2014 @ 01:01:29 PM
    Script : http://arabic.rt.com/forum/admincp/t....php?do=modify
    Referrer : http://arabic.rt.com/forum/admincp/index.php?do=nav

    Username : admin
    Classname : vB_Database_MySQLi
    MySQL Version : 5.5.34-MariaDB-wsrep-log

    P.S.
    vb 4.2.2
    server Linux, mysql version 5.5.34
    php version: 5.4.24
    forum language: Arabic
    no live version yet.

    thanks.

    Samer
    Last edited by samerss; Tue 4 Mar '14, 2:19am.

  • #2
    How are you creating a style with a specific ID? The first style should begin with ID #1 and they will increment up from there.

    Comment


    • samerss
      samerss commented
      Editing a comment
      I'm not creating with a specific ID. I'm creating as normal from admincp, and it takes ID zero not one.
      I changed the ID manually in the db.

  • #3
    Is the style.styleid field set to AUTO INCREMENT in the database?

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment


    • #4
      no, AUTO INCREMENT is not set for style.styleid
      repair tables gives me a note for style and template tables: Note: Table does not support optimize, doing recreate + analyze instead
      on my test server the forum is running, but after I tried to put it on main server it's showing blank for all pages

      Q: if I modify style table to set Autoincrement, would that fix the problem? or I should set autoincrement for some columns in template table too?
      plz write the sql statement in case I need to modify both tables.
      thanks guys.

      Comment


      • #5
        I've set Autoincrement to style.styleid
        now I can create styles with no errors, but when I run the tables repair I get the same note for both template and style tables.
        and the problem with blank pages is still there too.

        Comment


        • #6
          Soem table types can't don;t support the optimize command. That's not a problem- optimizing a table isn't going to fix blank/white pages. You need to figure out the error - usually PHP - that is causing the white page.

          Troubleshooting white pages is in the manual here- http://www.vbulletin.com/docs/html/b...rsion=40202500

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X