Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
z-grimv
New Member
New Member



Joined: Feb 04, 2008
Posts: 14

PostPosted: Tue Dec 21, 2010 9:09 am Reply with quote

Ello,

I was working away adding new content and for the third or fourth time now, I save the page text and nothing saves. It basically saves the contact page text blank but the header text still stays.

There are a lot of rows usually involved when this happens so are there restrictions on the amount of rows of text in a content post?

I've not used any crazy html or anything, just the default stuff that is available.

Any suggestions or ideas please advise as it appears I won't be-able to use the content module to submit the stuff I need on my site Sad

Cheers,
Z-GrimV
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Tue Dec 21, 2010 10:48 am Reply with quote

A. You need to let us know what versions of RN and the content module you are using.

B. The table structure for the content module was changed in recent releases. If you are using new code but haven't updated your tables you are probably generating SQL errors in the background. That would explain why you aren't seeing the results.

C. There are many posts and documentation on how to do this ... but you should turn on SQL error reporting in your rnconfig file and then look in the dblog file after you have tried to enter a content article. If there are SQL errors you will see them there.

D. The "official" structure of the content tables is in the RN 2.4 distribution, installation directory sql. The file name is rn_core.sql. Compare your current content tables structure to what's in there. The database updates are in rndb_upgrade.php in the installation directory. You'll have to read through it to find the ones pertaining to the content module.
 
View user's profile Send private message Visit poster's website
catweazle
Regular
Regular



Joined: Oct 14, 2006
Posts: 60
Location: Norway

PostPosted: Tue Dec 21, 2010 11:37 am Reply with quote

Hi,

Not sure this is of any help to you at all, but hopefully worth mentioning any way...

If your text won't save to the database, try to replace all Apostrophes (') with Grave Accents (`). I have to do the replacement in almost all text areas on my site before I'm able to save it to the database. This problem seems to be related to RavenNuke, or maybe the text editor(s)? I have no problem with this issue in phpBB2nuke...

Hopefully someone will take a look into this...

_________________
Regards,
Catweazle. 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Dec 21, 2010 12:23 pm Reply with quote

catweazle wrote:
Hi,

Not sure this is of any help to you at all, but hopefully worth mentioning any way...

If your text won't save to the database, try to replace all Apostrophes (') with Grave Accents (`). I have to do the replacement in almost all text areas on my site before I'm able to save it to the database. This problem seems to be related to RavenNuke, or maybe the text editor(s)? I have no problem with this issue in phpBB2nuke...

Hopefully someone will take a look into this...


Can you give a specific example so I can try and reproduce it?

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
catweazle







PostPosted: Tue Dec 21, 2010 2:42 pm Reply with quote

I installed SimpleCart (downloaded from TON).
I wanted to edit the content for the Mainpage, Refferers, Privacy and Terms pages. I then replaced the original text box ares with the nukeWYSIWYG editor. When trying to save the changes (with text that includes apostrophes), it won't save to DB .. and all the text just disappears from the text box when the page reloads.

Can't recall any other specific place at the moment, but will get back to you when I do...
 
fkelly







PostPosted: Tue Dec 21, 2010 3:34 pm Reply with quote

If the data you are trying to save includes apostrophes (a.k.a. single quotes) and it gets put in a SQL statement without being escaped it will generate a SQL error. So, for example if you are trying to save:

fieldA = dog'bone

and it is not escaped you'd get an error (which would be shown in the dblog if you had the appropriate rnconfig setting (mentioned before).

If you did addslashes(dog'bone) you'd get dog\'bone and MYSQL would parse it okay. Or even better mysql_real_escape string (dog'bone).

In RN code we try to always do either addslashes or mysql_real_escape string after data is entered in a wysiwyg text area field and before we execute a query on it. SimpleCart probably doesn't do that. If dog'bone is in a variable like $bonetype then you'd need to do something like:

fieldA = mysql_real_escape_string($bonetype) in your insert statement.

For both posters in this thread, if you don't learn to use dblogging to diagnose situations like this you are really flying blind.
 
PHrEEkie
Subject Matter Expert



Joined: Feb 23, 2004
Posts: 358

PostPosted: Tue Dec 21, 2010 3:53 pm Reply with quote

May not be the case here, but it is commonly becoming the case... a lot of scripts that are older and/or not updated used to rely on Magic_Quotes (which does what fkelly posted automatically). Magic Quotes used to be ON by default in php.ini, and is now OFF and/or completely deprecated depending on your current build. As well, many hosts who had PHP builds where it was on by default have shut it off.

Whenever you use older scripts, you should always try to contact the author or support to make sure their work is up-to-date. Failing that, many PHP support forums can usually give you a hand (assuming it isn't a huge suite of scripts).

If you're handy with looking through PHP scripts, you'd want to usually find any instances of magic_quotes and understand what the program is trying to do to the PHP environment. You will want to alter these scripts so that at every point, it is assumed magic_quotes are OFF, and handle $_POST, $_GET, $_REQUEST and MySQL data appropriately (among the most common variables). To a veteran programmer, this will usually take an extremely small amount of time. To a newcomer, you could get in fairly deep, fairly quick.

With the vast amounts of changes PHP devs are going through over the next year or so, a lot of scripts are going to need updating. Don't hesitate to ask if you have questions.

- Keith

_________________
PHP - Breaking your legacy scripts one build at a time. 
View user's profile Send private message
Palbin







PostPosted: Tue Dec 21, 2010 4:13 pm Reply with quote

catweazle, I just downloaded SimpleCart for a quick look. The problem is probably most defiantly what PHrEEkie said. You must have Magic_Quotes off/ I see uses of the filter() function in the admin section, but only for data coming out of the database instead of going in which is a little weird. I do not see the data getting escaped anywhere. So if you want a quick fix or not code savvy enough to fix this problem I would just enable magic_quotes in PHP.
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Tue Dec 21, 2010 4:21 pm Reply with quote

I was getting ready to say the same thing. That is an old module from DaDaNuke that I just did a few changes to make it work with RN.

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
z-grimv







PostPosted: Wed Dec 22, 2010 4:00 am Reply with quote

Hello,

I am using RavenNuke_v2.40.01 with the content module that came with it. I have not modified anything out of the core install. Fresh install and not an upgrade.

If it's the most recent release of RavenNuke, what else could be the problem?
 
z-grimv







PostPosted: Wed Dec 22, 2010 4:10 am Reply with quote

Also, the content module works, as I have created loads of pages, it just seems to stop saving info once the date becomes too long.
 
nuken







PostPosted: Wed Dec 22, 2010 7:14 am Reply with quote

Turn on error reporting in your config.php and see what errors are being reported.
 
PHrEEkie







PostPosted: Wed Dec 22, 2010 2:16 pm Reply with quote

My apologies.. I thought we were talking about Simple Cart...

I'll have a look and try to reproduce.

- Keith
 
fkelly







PostPosted: Wed Dec 22, 2010 2:47 pm Reply with quote

This thread is getting mixed up. Re. content, in a recent thread PHrEEkie said:

Quote:
You can alter the table _pages and increase the storage capacity for the various parts of the page. It is currently TEXT, but can be changed to MEDIUMTEXT (up to 16 MB) or LONGTEXT (up to 4 GB). The current setting, TEXT, can only hold about 64k.


That might help here. The thread is:

http://www.ravenphpscripts.com/posts19390-highlight-content+module.html

The symptoms look similar.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©