Author |
Message |
Targilnar
New Member
Joined: Nov 01, 2006
Posts: 11
|
Posted:
Thu Nov 02, 2006 6:16 am |
|
After having read the documentation it appears that I should be able to select blocks in admin mode and change them. For example I selected the login block and on the location dropdown changed it to the left side. I click save and then nothing happens and when I edit that block again, its back to what it was before.
I am running RN76 v2.02 on a Windows XP Pro, Apache, PHP 5.1, MySQL 5.0 setup.
Any ideas why this is the case? |
|
|
|
|
montego
Site Admin
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Thu Nov 02, 2006 6:38 am |
|
First of all, welcome to RavenPHPScripts!
It is possible that this is your issue:
http://www.ravenphpscripts.com/postt11043.html
There is a forum just for post-release fixes. Take a look here first. We also ask that everyone use the forum search tools first as well. There is a wealth of information in these forums if you look for it. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
|
Targilnar
|
Posted:
Thu Nov 02, 2006 6:50 am |
|
That isn't really the problem I'm having but I'll repost in the Post-Reease forum. Thanks for the quick response though. |
|
|
|
|
montego
|
Posted:
Thu Nov 02, 2006 7:50 am |
|
Targilnar, I would make the code fix anyways and then make sure it does not fix your issue. There is a bug in the code for 2.02.02 and it would be good to fix it before you say it doesn't fix your specific issue. |
|
|
|
|
Targilnar
|
Posted:
Thu Nov 02, 2006 8:15 am |
|
I'll try it when I go home for lunch. However I think my problem is larger than that. I tried creating groups this morning with the same result. Could fill out the form but when I tried to save nothing happened.
It almos feels like some kind of write protect issue, though I'm not sure where.
I found this article: http://www.ravenphpscripts.com/postt10956.html
Is there some kind of script or list of things to change for PHP 5 and MySQL 5, because thats what I'm running and I cant drop them or I loose my wiki. |
|
|
|
|
jakec
Site Admin
Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Thu Nov 02, 2006 1:03 pm |
|
It could the PHP 5 causing the problems. If you turn error checking on do you get any error messages? |
|
|
|
|
Targilnar
|
Posted:
Fri Nov 03, 2006 8:10 am |
|
I fixed my group edit problem by upgrading. I had downloaded version 2.02.00 by accident but reinstalling to 2.02.02 fixed that. I am still unable to save any admin changes to blocks other than activate and deactivate.
Montego - I applied the fix as you suggested no change.
Jakec - Error checking is set to true but I am not seeing any. |
|
|
|
|
montego
|
Posted:
Fri Nov 03, 2006 10:36 pm |
|
Targilnar, post the structure (not data) for your nuke_blocks table. |
|
|
|
|
Targilnar
|
Posted:
Sat Nov 04, 2006 8:10 am |
|
nuke_blocks table
Field Type Null Default
bid int(10) No
bkey varchar(15) No
title varchar(60) No
content text No
url varchar(200) No
bposition char(1) No
weight int(10) No 1
active int(1) No 1
refresh int(10) No 0
time varchar(14) No 0
blanguage varchar(30) No
blockfile varchar(255) No
view int(1) No 0
groups text No
expire varchar(14) No 0
action char(1) No
subscription int(1) No 0 |
|
|
|
|
montego
|
Posted:
Sat Nov 04, 2006 1:53 pm |
|
Well, that looks correct, which means that you still might have a file that is not correct. PM me your email address and I'll send you a admin\modules\blocks.php file to try out. |
|
|
|
|
Targilnar
|
Posted:
Mon Nov 06, 2006 10:10 am |
|
|
|
|
Targilnar
|
Posted:
Mon Nov 06, 2006 12:51 pm |
|
There was no difference after switching the blocks.php file. |
|
|
|
|
montego
|
Posted:
Mon Nov 06, 2006 6:10 pm |
|
I hate to do this to you, but I just saw this here in your original post:
Quote: |
PHP 5.1, MySQL 5.0 setup.
|
RavenNuke (or even PHP-Nuke for that matter) is not certified to run on these. PHP 4.4.x and MySQL 4.1.x are the recommend "stack" components.
Unfortunately, this works just fine for every installation that I have done, so there must be something in there that either PHP 5.1 or MySQL 5.0 doesn't like. |
|
|
|
|
Guardian2003
Site Admin
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Mon Nov 06, 2006 10:08 pm |
|
I think its the mysql version as I'm using PHP 5.1.6 on a test site and not experiencing this at all.
In the deepest crevices of my befuddle mind, something is niggling me and it has something to do with one of the table field names being a new 'reserves' word in mysql 5 - but I just cannot put my finger on where got the data from sorry. |
|
|
|
|
montego
|
Posted:
Tue Nov 07, 2006 6:25 am |
|
** EDITED BY MONTEGO: Sorry about this guys! The issue isn't with "active", but "action".... sorry, just had a momentary brainfart. I have corrected the example below ***
Guardian2003, you are THE MAN! While "action" and "time" are not on the "reserved" list for 5.0/5.1, they ARE on a list, so we should try something.
Targilnar, I don't have any way of testing this on mySQL 5.0, so you will have to try this out for us.
Everywhere in the build of a SQL statement that you see the words "action" or "time", backquote them. For example, if you see this:
$result8 = $db->sql_query("update ".$prefix."_blocks set bkey='$bkey', title='$title', content='$content', url='$url', bposition='$bposition', weight='$weight', active='$active', refresh='$refresh', blanguage='$blanguage', blockfile='$blockfile', view='$view', groups='$ingroups', expire='$expire', action='$action', subscription='$subscription' where bid='$bid'");
Change it to look like this:
$result8 = $db->sql_query("update ".$prefix."_blocks set bkey='$bkey', title='$title', content='$content', url='$url', bposition='$bposition', weight='$weight', active='$active', refresh='$refresh', blanguage='$blanguage', blockfile='$blockfile', view='$view', groups='$ingroups', expire='$expire', `action`='$action', subscription='$subscription' where bid='$bid'");
Pay close attention to the `action`. See the backquote marks? Unfortunately, there is a ton of sql statements being used in this file, so this could get quite tedious, but start with one function that does not work, such as an "BlockAdd" and see if it works.
Since you are choosing to run PHP-Nuke, it might also be a good idea to see if you can somehow use mySQL 4.1.x as you are going to find other issues with 5.x as you go along. |
|
|
|
|
Targilnar
|
Posted:
Tue Nov 07, 2006 10:42 am |
|
I tried updating action in the BlocksEditSave function but there was no change. Then I took the following sql statement.
Code:
update nuke_blocks set bkey='$bkey', title='$title', content='$content', url='$url', bposition='$bposition', weight='$weight', active='$active', refresh='$refresh', blanguage='$blanguage', blockfile='$blockfile', view='$view', groups='$ingroups', expire='$expire', `action`='$action', subscription='$subscription' where bid='$bid'
|
and set it up to change the search block
Code:
update nuke_blocks set bkey='', title='Search', content='', url='', bposition='r', weight='2', active='0', refresh='3600', blanguage='', blockfile='block-Search.php', view='0', groups='', expire='0', `action`='d', subscription='0' where bid='4'
|
The query ran with no issues and worked properly. Also I can add blocks/delete blocks just not edit them. The values were pulled right from the db with the only change being the bposition from "l" to "r".
Is there any way to see the sql calls being made so I can hunt down the problem that way. I have no problem putting some effort into making a MySQL 5.x compatible version of blocks.php but I need some method of debugging. |
|
|
|
|
evaders99
Former Moderator in Good Standing
Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Tue Nov 07, 2006 4:12 pm |
|
Well you can just copy the SQL query out and echo that back to the screen. Then try that in phpMyAdmin
That's generally what I do when one query seems to be buggy. |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
|
Targilnar
|
Posted:
Tue Nov 07, 2006 8:24 pm |
|
I'm not really to familiar with php, however when I put an echo on there I don't see it on the screen. Possibly because the php is being called and then the page is refreshing. Any suggestions or is there a system out mode like java? |
|
|
|
|
evaders99
|
Posted:
Tue Nov 07, 2006 10:34 pm |
|
Use the die() command after you echo out the query. That will prevent the script from loading further |
|
|
|
|
montego
|
Posted:
Wed Nov 08, 2006 6:48 am |
|
Are you not able to edit any blocks or is it a specific one that we can try too? |
|
|
|
|
Targilnar
|
Posted:
Wed Nov 08, 2006 9:32 am |
|
None of the blocks are editable. I am going to try an echo and die() command at lunch today and see if I can get the sql statements.
Here is the error I get when I paste the callled SQL statement
SQL query:
UPDATE nuke_blocks SET title = 'Search',
content = '',
bposition = 'l',
weight = '3',
active = '0',
refresh = '',
blanguage = '',
blockfile = 'block-Search.php',
VIEW = '2',
groups = '',
subscription = '0' WHERE bid = '4'
MySQL said: Documentation
#1264 - Out of range value adjusted for column 'refresh' at row 1
Its an out of range error because you try to put a blank value in an int column, if you change the value to 0 it works fine.
The fix is to add the following line at the begining of BlocksEditSave
if($refresh == "") { $refresh='0'; } |
|
|
|
|
evaders99
|
Posted:
Wed Nov 08, 2006 2:18 pm |
|
Good catch!
I think refresh is just an number type. So we can use
Code:
$refresh = intval($refresh);
|
as well |
|
|
|
|
montego
|
Posted:
Thu Nov 09, 2006 6:08 am |
|
evaders99, I'll take a look at it. I see some more clean-up that can be done on this file as well. It is just odd to me that none of us, even in our RN 2.10 testing, have run into this issue. Something, I think, must be different about Targilnar's setup, but what could it be? |
|
|
|
|
Targilnar
|
Posted:
Thu Nov 09, 2006 7:00 am |
|
evaders99 code changed worked perfectly as well.
montego I can give you more specifics on my setup if you would like them. |
|
|
|
|
montego
|
Posted:
Thu Nov 09, 2006 7:21 am |
|
No need. I found it. If you had edited a block that was an RSS feed, it would have worked. If its not an RSS feed block, the *refresh* is not being passed from the browser. Hence why this fix will work just fine. I will make the same in RN2.10. Problem is, I cannot see why this works for the rest of us. But, regardless, this needs to have an intval on it.
Thanks! |
|
|
|
|
|