Error creating pages with Content (Enhanced)
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks
Author Message
Anja
Newbie


Joined: Feb 02, 2006
Posts: 9

PostPost subject: Error creating pages with Content (Enhanced)
Posted: Thu Feb 02, 2006 11:27 pm
Reply with quote

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
View user's profile Visit poster's website
dISmAG
Nice poster


Joined: Apr 23, 2004
Posts: 95
Location: New-York

PostPost subject: Re: Error creating pages with Content (Enhanced)
Posted: Fri Feb 03, 2006 2:00 am
Reply with quote

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
View user's profile Visit poster's website
darkgrue
Developer


Joined: Apr 20, 2004
Posts: 536
Location: Lancaster, CA

PostPost subject: Re: Error creating pages with Content (Enhanced)
Posted: Fri Feb 03, 2006 12:13 pm
Reply with quote

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
View user's profile Visit poster's website
Anja
Newbie


Joined: Feb 02, 2006
Posts: 9

PostPost subject: Re: Error creating pages with Content (Enhanced)
Posted: Fri Feb 03, 2006 3:54 pm
Reply with quote

Works great now! Thanks Mr. Green

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
View user's profile Visit poster's website
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: Error creating pages with Content (Enhanced)
Posted: Fri Feb 03, 2006 4:44 pm
Reply with quote

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
View user's profile Visit poster's website
darkgrue
Developer


Joined: Apr 20, 2004
Posts: 536
Location: Lancaster, CA

PostPost subject: Re: Error creating pages with Content (Enhanced)
Posted: Fri Feb 03, 2006 5:29 pm
Reply with quote

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
View user's profile Visit poster's website
ostvard
Silver Supporter


Joined: Sep 13, 2004
Posts: 25
Location: London, UK

PostPost subject: Re: Error creating pages with Content (Enhanced)
Posted: Fri Feb 03, 2006 11:33 pm
Reply with quote

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
Code:
$text = $_POST['text'];
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
View user's profile Visit poster's website
darkgrue
Developer


Joined: Apr 20, 2004
Posts: 536
Location: Lancaster, CA

PostPost subject: Re: Error creating pages with Content (Enhanced)
Posted: Sun Feb 05, 2006 2:26 am
Reply with quote

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
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks All times are GMT
Page 1 of 1


Jump to:  
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

stopsoftwarepatents.eu petition banner
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 1.2951 seconds with 17 DB Queries in 0.1941 seconds
Memory Usage: 3.02 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy