Page 1 of 2
Error while creating new article content
Posted: Fri 25. Feb 2005, 00:06
by Volk
I got the following error message if I want to create new article content:
error while creating new article content
sql: SELECT DISTINCT *, date_format(article_tstamp, '%Y-%m-%d %H:%i:%s') AS article_date FROM phpwcms_article LEFT JOIN phpwcms_articlecat ON phpwcms_article.article_cid=phpwcms_articlecat.acat_id WHERE phpwcms_article.article_id='8' LIMIT 1;
What I'm doing wrong?
(Running phpwcms 1.2.1-Dev)
Volk
Posted: Fri 25. Feb 2005, 06:10
by Pappnase
hello
look like you have problems with the db! was it an new install or an upgrade!?
Posted: Fri 25. Feb 2005, 14:49
by Volk
look like you have problems with the db! was it an new install or an upgrade!?
It's a new installation.
Any idea to solve the problem?
Posted: Fri 25. Feb 2005, 15:01
by Pappnase
hello
maybe there was a problem with the db at the setup. sop please drop all phpwcms tabels from teh db and reinstall.
and don#t forget to check the box "Create all tables" at the first setup screen.
Posted: Fri 25. Feb 2005, 16:38
by Volk
Hello again,
maybe there was a problem with the db at the setup. sop please drop all phpwcms tabels from teh db and reinstall.
and don#t forget to check the box "Create all tables" at the first setup screen.
I have
- drop the db
- create new db
- reinstall WCMS
- create all tables at he first setup screen (I can see the tables with phpMyadmin)
Same problems as before. Very frustrated...
Volk
Posted: Fri 25. Feb 2005, 16:53
by Pappnase
hello
wich php / mysql vversion is running on you space!?
Posted: Fri 25. Feb 2005, 17:00
by Volk
Hi Pappnase,
wich php / mysql vversion is running on you space!?
PHP 4.3.10
MySQL 4.0.23
phpMyAdmin 2.6.1
on localhost (Windows XP, Apache)
Volk
Posted: Fri 25. Feb 2005, 17:34
by Karla
Just for grins... Try changing "upper case" of variable name
$SQL to "lower case"
$sql
in file "article.editcontent.inc.php" line 296.
FROM
Code: Select all
$SQL = "INSERT INTO ".DB_PREPEND."phpwcms_articlecontent SET " . $SQL;
TO
Code: Select all
$SQL = "INSERT INTO ".DB_PREPEND."phpwcms_articlecontent SET " . $sql;
BECAUSE
I ~think~ your db query string came from
HERE
Code: Select all
$sql = "SELECT DISTINCT *, date_format(article_tstamp, '%Y-%m-%d %H:%i:%s') AS article_date ".
"FROM ".DB_PREPEND."phpwcms_article LEFT JOIN ".DB_PREPEND."phpwcms_articlecat ON ".
DB_PREPEND."phpwcms_article.article_cid=".DB_PREPEND."phpwcms_articlecat.acat_id WHERE ".
DB_PREPEND."phpwcms_article.article_id='".$article["article_id"]."' LIMIT 1;";
Posted: Fri 25. Feb 2005, 18:20
by Volk
Hi Karla,
Try changing "upper case" of variable name $SQL to "lower case" $sql
in file "article.editcontent.inc.php" line 296.
FROM
Code:
$SQL = "INSERT INTO ".DB_PREPEND."phpwcms_articlecontent SET " . $SQL;
TOCode:
$SQL = "INSERT INTO ".DB_PREPEND."phpwcms_articlecontent SET " . $sql;
I have changed to lower case. I did'nt get the error message any more, but I also did'nt get the Screen to input the content.
I have selected
Inhaltsart: Einfacher Text
Status sichtbar
and clicked on Erstellen but nothing happend...
Volk
Posted: Sat 26. Feb 2005, 11:40
by Karla
I'm sorry for the wild chase... was just curious if that SQL query was the last to be executed. I suspect not, because it should go on to build the article content from lines 262-296 here:
Code: Select all
if(!isset($content["error"])) { //if no error
$SQL = "acontent_aid = '".$content["aid"]."', ";
$SQL .= "acontent_uid = '".$_SESSION["wcs_user_id"]."', ";
$SQL .= "acontent_title = '".aporeplace($content["title"])."', ";
$SQL .= "acontent_subtitle = '".aporeplace($content["subtitle"])."', ";
$SQL .= "acontent_type = '".$content["type"]."', ";
$SQL .= "acontent_sorting = '".$content["sorting"]."', ";
$SQL .= "acontent_visible = '".$content["visible"]."', ";
$SQL .= "acontent_before = '".$content["before"]."', ";
$SQL .= "acontent_after = '".$content["after"]."', ";
$SQL .= "acontent_top = '".$content["top"]."', ";
$SQL .= "acontent_block = '".$content["block"]."', ";
$WHERE = '';
// load SQL addition for special content part
if(file_exists("include/inc_lib/content/cnt".$content["type"].".sql.inc.php")) {
include("include/inc_lib/content/cnt".$content["type"].".sql.inc.php");
} else {
include("include/inc_lib/content/cnt0.sql.inc.php");
}
if(!$content["id"]) { //if new content part should be created
/*
if(file_exists("include/inc_lib/content/cnt".$content["type"].".insert.inc.php")) {
include("include/inc_lib/content/cnt".$content["type"].".insert.inc.php");
} else {
include("include/inc_lib/content/cnt0.insert.inc.php");
}
*/
// use SET method for INSERT too
$SQL = "INSERT INTO ".DB_PREPEND."phpwcms_articlecontent SET " . $SQL;
Posted: Sat 26. Feb 2005, 21:48
by cyrano
hi,
had seen on one installation the same error.
set SQL to sql but makes no difference -any more suggestions therefore?
error
Code: Select all
error while connecting to database
INSERT INTO db_webdes_phpwcms_article (article_cid, article_uid, article_username, article_title, article_keyword, article_public, article_aktiv, article_begin, article_end, article_subtitle, article_redirect, article_sort, article_notitle, article_created, article_cache, article_nosearch) VALUES ('13','1',xxxxx,'vbb','','1','1','2005-02-26 22:37:38','2010-12-31 23:59:59','','', 0,0, '1109453858', '', '');
thank you.
Posted: Tue 1. Mar 2005, 08:52
by cyrano
Hi,
does someone knows what happens here with the error shown above?
Is this a structural problem with the database?
Possible to repair? or does it seems we need to re-install all?
thank you in advance.
Posted: Tue 1. Mar 2005, 09:08
by pico
Hi
in first Line you read this in the Error
error while connecting to database
think that this is what you have to investigate
Posted: Tue 1. Mar 2005, 09:14
by cyrano
hi pico,
yes i read this, but don't know what's to do next and where to dig?
I can move articles so there is a contact to the DB, but cannot add more structure levels or articles.
So which part is to reinstall or which part in mysqladmin must be changed/added/updated?
Thank you for reply pico.
SOLVED: There was some missing table field, why? I don't know.
did someone solve this problem?
Posted: Tue 8. Mar 2005, 13:14
by nosmile
Hi.
I've just encountered almost the same thing:
I can't create article contents - there is no screen to input the content.
I can't even create summary, but I can create article itself and add the picture to it.
When I try to create content anyway (press the button) I get the following message:
error while creating new article content
and of course mysql details - but I am connected to mysql.
Fresh install - phpwcms 1.2.1 dev
I am afraid it's server specific - I have no problem with other server, and no problem with local installation, but for crying out loud - what's the solution???
any ideas?
-------------
I forgot to mension - same thing with phpwcms 1.1-RC4 !!!
-------------
I still have no idea what to do...
It happened after server upgrade... now it's PHP Version 4.3.10 + mysql 4.0.23a
solved!
goddamned php.ini bug, I am going to kill admin
( /usr/lib/php instead of .::/usr/share/pear)