Error creating pages with Content (Enhanced)
| Author |
Message |
Anja


Joined: Feb 02, 2006 Posts: 9
|
Post subject: Error creating pages with Content (Enhanced) Posted: Thu Feb 02, 2006 11:27 pm |
|
Good evening,
I installed the most recent Content (Enhanced) module for a gaming site, and have run into problems creating pages via the admin menu. I am able to create categories just fine, but as soon as I submit a new page, regardless of content, I get an error page that reads:
A database error has occurred
The webmaster has been notified of the error
I am the webmaster, and do not receive any such email. (p.s. email is confirmed to work through the site via the Contact Us module).
Anyway. I tried uninstalling it and using the latest "standard" Content module, which works perfectly. If I then try to upgrade to Content (Enhanced) with existing categories and pages in place (vs. the clean install mentioned above), I again find myself able to create new categories, but unable to create new pages.
Again, I am not receiving the error notice so I don't have much to work with. If anyone has any ideas on how to fix this issue, I would greatly appreciate it!
Anja's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 4.0.25/PHP 4.4.1/CPG 9.0.6.1 |
|
| Back to top |
|
 |
dISmAG


Joined: Apr 23, 2004 Posts: 95 Location: New-York
|
Post subject: Re: Error creating pages with Content (Enhanced) Posted: Fri Feb 03, 2006 2:00 am |
|
same problem I upgraded and got the problem when trying to create the page
=============== also in debuge=======
modules/Content/admin/index.inc
Warning line 67: Missing argument 1 for content_save()
includes/db/db.php
CMS Warning line 51: On /admin.php?op=Content&mode=content_save While executing query "INSERT INTO cms_pages SET cid='1', title='Всем привет', subtitle='Всем привет', active='0', page_header='Всем привет', text='Всем привет', page_footer='Всем привет', signature='Всем привет', date=now(), counter='0', language='russian')" the following error occured: 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 2 In: /home/koresara/public_html/modules/Content/admin/index.inc on line: 95
dISmAG's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache/MySQL 4.0.18/PHP 4.3.9/CPG 9.0.6 |
|
| Back to top |
|
 |
darkgrue


Joined: Apr 20, 2004 Posts: 536 Location: Lancaster, CA
|
Post subject: Re: Error creating pages with Content (Enhanced) Posted: Fri Feb 03, 2006 12:13 pm |
|
Anja wrote:
Good evening,
I installed the most recent Content (Enhanced) module for a gaming site, and have run into problems creating pages via the admin menu. I am able to create categories just fine, but as soon as I submit a new page, regardless of content, I get an error page that reads:
A database error has occurred
The webmaster has been notified of the error
I am the webmaster, and do not receive any such email. (p.s. email is confirmed to work through the site via the Contact Us module).
The Content module doesn't send that error e-mail, the error handler in the core does. And just decause the Contact Us module sends e-mail doesn't mean the error handler can. If you're not getting the e-mail, you have a local configuration or e-mail routing problem that's outside of the scope of the module, I'm afraid.
dISmAG wrote:
same problem I upgraded and got the problem when trying to create the page
=============== also in debuge=======
modules/Content/admin/index.inc
Warning line 67: Missing argument 1 for content_save()
includes/db/db.php
CMS Warning line 51: On /admin.php?op=Content&mode=content_save While executing query "INSERT INTO cms_pages SET cid='1', title='Всем привет', subtitle='Всем привет', active='0', page_header='Всем привет', text='Всем привет', page_footer='Всем привет', signature='Всем привет', date=now(), counter='0', language='russian')" the following error occured: 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 2 In: /home/koresara/public_html/modules/Content/admin/index.inc on line: 95
You are probably both having the same problem - there's a stray ")" in the DB query that's causing the error. In file modules/Content/admin/index.inc, change Line 95 from:
PHP:
SET cid='$cid', title='$title', subtitle='$subtitle', active='$active', page_header='$page_header', text='$text', page_footer='$page_footer', signature='$signature', date=now(), counter='0', language='$language')", FALSE);
to:
PHP:
SET cid='$cid', title='$title', subtitle='$subtitle', active='$active', page_header='$page_header', text='$text', page_footer='$page_footer', signature='$signature', date=now(), counter='0', language='$language'", FALSE);
I'm in the process of uploading version 9.7.5, which will include this fix. Thank you for reporting the problem!
_________________ It is pitch black. You are likely to be eaten by a grue.
darkgrue's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Ubuntu 11.04, Atom D525/Apache 2.2.17/MySQL 5.1.54/PHP 5.3.5/Dragonfly 10.0.04 CVS |
|
| Back to top |
|
 |
Anja


Joined: Feb 02, 2006 Posts: 9
|
Post subject: Re: Error creating pages with Content (Enhanced) Posted: Fri Feb 03, 2006 3:54 pm |
|
Works great now! Thanks
Anja's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) MySQL 4.0.25/PHP 4.4.1/CPG 9.0.6.1 |
|
| Back to top |
|
 |
rosbif


Joined: Jan 13, 2005 Posts: 571 Location: Paris, France
|
Post subject: Re: Error creating pages with Content (Enhanced) Posted: Fri Feb 03, 2006 4:44 pm |
|
I actually found that error on line 94 - on a line that said:
PHP:
VALUES NULL, '$cid', '$title', '$subtitle', '$active', '$page_header', '$text', '$page_footer', '$signature', now(), '0', '$language'", FALSE);
Hope that's right!?
rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/2.2.11/5.0.77/5.2.8/9.2.1 |
|
| Back to top |
|
 |
darkgrue


Joined: Apr 20, 2004 Posts: 536 Location: Lancaster, CA
|
Post subject: Re: Error creating pages with Content (Enhanced) Posted: Fri Feb 03, 2006 5:29 pm |
|
rosbif wrote:
I actually found that error on line 94 - on a line that said:
PHP:
VALUES NULL, '$cid', '$title', '$subtitle', '$active', '$page_header', '$text', '$page_footer', '$signature', now(), '0', '$language'", FALSE);
Hope that's right!?
Yes, that's correct. I may have miscounted lines by 1. It's the same file, same stray right parenthesis. What happened was I changed the SQL statement from a VALUES list (which has to be in the exact order and number of arguments as the database schema) to a SET statement that explicitly enumerates the column names. It was a stylistic change to make the code more maintainable, but I forgot to edit out the closing parenthesis from the VALUES list, which caused the problem.
_________________ It is pitch black. You are likely to be eaten by a grue.
darkgrue's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Ubuntu 11.04, Atom D525/Apache 2.2.17/MySQL 5.1.54/PHP 5.3.5/Dragonfly 10.0.04 CVS |
|
| Back to top |
|
 |
ostvard


Joined: Sep 13, 2004 Posts: 25 Location: London, UK
|
Post subject: Re: Error creating pages with Content (Enhanced) Posted: Fri Feb 03, 2006 11:33 pm |
|
Hi,
After downloading and installing 9.7.5 I was getting the following error.
modules\Content\admin\index.inc
* Warning line 67: Missing argument 1 for content_save()
includes\db\db.php
* CMS Warning line 51: On /admin.php?op=Content&mode=content_save While executing query "INSERT INTO cms_pages SET cid='0', title='qw', subtitle='', active='0', page_header='', text='p>Balinese', page_footer='', signature='', date=now(), counter='0', language='english'"
the following error occured: 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 's' at line 2 In: D:\Inetpub\wwwroot\KittyCatPics\modules\Content\admin\index.inc on line: 95
Checked for the extra ")" which was not there. The problem seemed to be with a ".
Checked index.inc and found the following fix.
change line 74 from
Code:
// $text = Fix_Quotes($_POST['text']);
to
Code:
$text = Fix_Quotes($_POST['text']);
change line 75 from
to
Code:
// $text = $_POST['text'];
Hope it helps.
ostvard's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Local OS - WIN32/IIS - 6/My SQL - 5.0.27/PHP - 5.2.1/Dragonfly - 9.1.1 |
|
| Back to top |
|
 |
darkgrue


Joined: Apr 20, 2004 Posts: 536 Location: Lancaster, CA
|
Post subject: Re: Error creating pages with Content (Enhanced) Posted: Sun Feb 05, 2006 2:26 am |
|
I apologize for that. That was a temporary change I made for testing. I packaged and uploaded the wrong version. I'm working on 9.7.6 to fix this, but I'm setting it aside a day or two to take a little extra time off of it before I start testing it again.
_________________ It is pitch black. You are likely to be eaten by a grue.
darkgrue's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Ubuntu 11.04, Atom D525/Apache 2.2.17/MySQL 5.1.54/PHP 5.3.5/Dragonfly 10.0.04 CVS |
|
| Back to top |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|

|
User Info ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Welcome Anonymous
Last CVS commits ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Languages ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Community ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Support for DragonflyCMS in a other languages:
• Deutsch
• Español
X-links ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Preview theme ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.
|