[ar] [ca] [cpf] [de] [en] [es] [fr] [it]

This is where you can ask questions about the SPIP cms.

Topics : 255 Topics solved :  30 %

35 visitors now


SQL error 1052

by PhDG - 8 June 2012 12:48 - Replies : 11

When entering the private section of my site (SPIP 2.1.14), I get this message:
QUOTE
“SQL error 1052
Column ’statut’ in where clause is ambiguous
SELECT articles.id_article, articles.titre, articles.id_rubrique, articles.statut, articles.date, articles.lang, articles.id_trad, articles.descriptif, petitions.id_article AS petition FROM spip_articles AS articles LEFT JOIN spip_petitions AS petitions ON articles.id_article=petitions.id_article WHERE statut=’prepa’ AND id_rubrique=0 ORDER BY date DESC LIMIT 0, 15”
UNQUOTE

There is no indication identifying the template that must be corrected. I understand that there is something wrong in the MySQL codes in some place but I don’t know where.

As far as the public part of my site is concerned, all articles have disappeared !!

Can someone help me ? Great thanks in advance !!


  • #1 > SQL error 1052 ˆ
    by Gilles - 8 June 2012 14:29

    Hi,

    do you have some plugins installed ? Have you done an upgrade or something else before this bug appeared ?


  • < #2 > SQL error 1052 ˆ
    by PhDG - 8 June 2012 14:45

    Yes. I have installed SPIP 3.0.1 after having safeguarded my database. But as the plugin SARKA-SPIP is not yet updated to SPIP 3.0.1, I have had to reinstall SPIP 2.1.4 and my previously safeguarded database. For the moment all other plugins are inactive.


  • < #3 > SQL error 1052 ˆ
    by Gilles - 8 June 2012 14:54

    Have you deleted the tmp/cache folder ?


  • < #4 > SQL error 1052 ˆ
    by PhDG - 8 June 2012 15:58

    I did not delete the folder but I have used the "empty the cache" function.


  • < #5 > SQL error 1052 ˆ
    by Gilles - 8 June 2012 16:01

    Try to delete the forder (it will be re-created after). The function "empty cache" maybe wasn’t effective when you downgraded your installation.


  • < #6 > SQL error 1052 ˆ
    by PhDG - 8 June 2012 17:15

    I did it. tmp/cache is deleted. Now the message "SQL error 1052" does not appear any more but all my articles have gone !


  • < #7 > SQL error 1052 ˆ
    by Gilles - 8 June 2012 17:23

    In your back-office too ?
    How did you save your database ? With phpmyadmin (sql backup) or with SPIP (.xml dump) ? How did you downgraded your website ? You should have re-installed it on a restored database - it looks like you have reinstalled it on an empty database.


  • < #8 > SQL error 1052 ˆ
    by PhDG - 8 June 2012 17:29

    If by "backoffice" you mean "private section", the answer is yes.

    The save was done with SPIP (.xml dump)


  • < #9 > SQL error 1052 ˆ
    by Gilles - 8 June 2012 17:36

    ok,

    as you had errors in your private section before, I think that the restoration of the xml file didn’t work.
    Can you try it again ?


  • < #10 > SQL error 1052 ˆ
    by PhDG - 8 June 2012 17:54

    Restoration done. It gives me the message "Error: see below: Unknown column ’id_article’ in ’field list’ ".

    The "SQL error 1052" reappears !


  • < #11 SQL error 1052 ˆ
    by Gilles - 8 June 2012 18:21

    It’s not the same error. What is the exact SQL query that fails ? Don’t forget to remove /tmp/cache after restoration.

    Contact me by Private Message if you want me to check that your dump.xml file is correct.


  •  


Answering the question

« SQL error 1052 »

Keywords

You can tag this forum page with the keywords that you think are the most appropriate. This will help future visitors to find answers more quickly.


Installation, updates

Using the private area

Administration, management and configuration of your site

Creating your templates

Who are you?
  • Log in Register

  • How to place a JavaScript link as an image

    by Leandro
    25 April 04:28

    No reply

    I need help to paste a javascript link (a poll) as an image of an article. How do i do that?

  • Backup the content of the database, fails to create a file

    by CLA001
    8 March 2016 09:15

    Replies : 2

    My last backups were about 600kb I’m guessing that’s not big :) I will look into the add-on and if I cant figure that out ill try the phpmyadmin. Thanks for your (...)

  • Category Page is not displaying

    by devkbsc
    22 September 2015 16:33

    Replies : 2

    Hello, your reply have give me a confidence! If you say it’s a personalised per i am not the one who developped that page. I am a new developer after the one who developped that page. Now it’s (...)

  • How can i change the url of my site to the Arborescent URLs?

    by JMV
    14 July 2015 14:39

    Replies : 5

    Make sure you have the following lines in your .htaccess file. If it is commented (#) just make it a comment. ################################################## RewriteEngine On (...)

  • i can't access the site

    by Radwa
    10 March 2015 13:06

    Replies : 4

    Hi , I have the same problem , I upgraded the server to wheezy so the php version changed but I can’t update spip as I can’t access the private area is there a way to have spip working on (...)

  • chang register form from writer

    7 December 2014 09:16

    No reply

    hello i want insert an item in register writer form .plz led me.thanks

  • how to change toolbar to enhance my texts

    by djallas
    1 December 2014 16:36

    No reply

    hello everyone, how can i change the text toolbar appeared when writing an article ? i want to use mine my spip version is SPIP 3.0.17 Thank you

  • SQL error 1052

    by Gilles
    8 June 2012 18:21

    Replies : 11

    It’s not the same error. What is the exact SQL query that fails ? Don’t forget to remove /tmp/cache after restoration. Contact me by Private Message if you want me to check that your dump.xml file (...)

  • Can I find a deleted item?

    by Mkode
    23 September 2014 14:11

    Solved - Replies : 1

    [12:24] boucle with statut = poubelle [12:25] but the get deleted of db every X days [12:25] (X value is 15 or 30, can’t remmember)

  • I don't find a page

    by Suske
    9 September 2014 17:16

    Replies : 1

    Use /?page=contact&var_mode=inclure to see which part of your skeletton gives the form.

  • Forum posts : 280
  • 95 30 %
  • Ask a new question