problem with articles
problem with articles
Hi there,
once again I want to thank Oliver for such great upgrade. I updated my phpwcms to the latest version this morning, everything works great and all, but I have one small problem.
In the admin panel, the site structure shows all the previous structures that I had before the update, but when I got to "article center" to create a new article under those categories, I get the following error,
here is my "site structure"
and here is my "article center"
I also see all the old articles when I view my site, the only problem is that I can't see any of them or the categories in the "article center",
thank you.
once again I want to thank Oliver for such great upgrade. I updated my phpwcms to the latest version this morning, everything works great and all, but I have one small problem.
In the admin panel, the site structure shows all the previous structures that I had before the update, but when I got to "article center" to create a new article under those categories, I get the following error,
here is my "site structure"
and here is my "article center"
I also see all the old articles when I view my site, the only problem is that I can't see any of them or the categories in the "article center",
thank you.
Yes I did upgrade from the last version. As for the database, I didn't update anything or add anything from the phpmyadmin. Could you possibly tell me how to update the database as well? I tried to read the instructions with the files but there was only the copyright notice and the "under construction" for the instructions.
thank you.
thank you.
oh man sorry I guess I was wrong! I've read about a problem with a fresh install! But you updated your version so I really don't know about what could be the solution ?!? maybe you should just try to run the upgrad script again ?!? did really everything pass well ?!? I guess it must have something to do with your database... maybe check if this was correctly done during the update, otherwise post to the bugs forum!
While running the "upgrade.php", there is a dropdown box near the bottom that allows choice of .SQL files (by date). All choices "dated" after your previous version, should be selected and run, in order to add the updated structures to the database. Repeat this for all files dated more recently than your previous version date.sean wrote:Yes I did upgrade from the last version. As for the database, I didn't update anything or add anything from the phpmyadmin. Could you possibly tell me how to update the database as well?
thanks again for the help, I tried to run the updates again, but it seems like that it has already been updated, cause it tells me that those tables/commands have already been processed and that they can't be duplicated or something. I still get the same error thoDeXXus wrote:There are at least two(2) that you ~MUST~ run if upgrading from last version (1.1-RC4_2004-06-22). If you had an earlier version... there are even more to be run. Just a "heads up"
thanks for the help again tho, really appericiate it.
The error originates here in "admin.functions.inc.php":
Re-check your "config.inc.php" to make sure your database values are all present and correct... including $phpwcms["db_prepend"]
Code: Select all
function struct_articlelist ($struct_id, $counter, $cut_article, $dbcon) {
$count_article = 0;
$sql = "SELECT article_id, article_cid, article_title, article_public, article_aktiv, article_uid, ".
"date_format(article_tstamp, '%Y-%m-%d %H:%i:%s') AS article_date FROM ".
DB_PREPEND."phpwcms_article WHERE article_cid='".$struct_id."' AND article_deleted=0 ".
"ORDER BY article_sort;";
if($result = mysql_query($sql, $dbcon) or die ("error while browsing related articles")) {
while($row = mysql_fetch_array($result)) {
$article[$count_article] = $row;
$count_article++;
}
mysql_free_result($result);
}
hehe thanks.
After pulling my hair out for about a month, I finally fixed it and found out what was wrong with it.
in my admin.functions.inc I had this originally,
then, I kept looking back and forth with what DeXXus had pasted here, after doing tests over tests, i found out that this error could all be fixed if you just add in here
thanks again for the help, not sure if this would be a bug or just some random error, lol.
After pulling my hair out for about a month, I finally fixed it and found out what was wrong with it.
in my admin.functions.inc I had this originally,
Code: Select all
function struct_articlelist ($struct_id, $counter, $cut_article, $article_order=0) {
$count_article = 0;
$article_order = intval($article_order);
$show_sort = (!$article_order || $article_order == 1) ? 1 : 0;
$ao = get_order_sort($article_order);
echo "\n\n\n".'<!-- ORDER: '.$ao[2].' //-->'."\n\n\n";
$sql = "SELECT article_id, article_cid, article_title, article_public, article_aktiv, article_uid, ".
"date_format(article_tstamp, '%Y-%m-%d %H:%i:%s') AS article_date FROM ".
DB_PREPEND."phpwcms_article WHERE article_cid='".$struct_id."' AND article_deleted=0 ".
"ORDER BY ".$ao[2].";";
//"ORDER BY article_sort;";
if($result = mysql_query($sql, $GLOBALS['db']) or die ("error while browsing related articles")) {
while($row = mysql_fetch_array($result)) {
$article[$count_article] = $row;
$count_article++;
}
mysql_free_result($result);
}
Code: Select all
$dbcon
Code: Select all
function struct_articlelist ($struct_id, $counter, $cut_article, $dbcon, $article_order=0) {