Hi all,
I would like to create a new block on the right of my site to display some info. I have used this feature many times back when I had 7.3 phpNuke, but it doesn't seem to be working now.
I create the block - Name "Test" and Text "Test" - And click the "Create Block" Button - I get brought back to the Block Admin page, but the block is not created.
I have tried to create a block to a module (such as surveys) and it doesn't get created either....
There could be a difference between not adding the record the blocks table and not displaying it, and the difference will help determine what the problem is.
Can you see the new block in the blocks administration? If not, the problem could either be with the blocks administration code or with the blocks table, or both. If so, the problem could be with the theme, with the main index.php file, and / or with the module index.php files...
Can you see the new block in the blocks administration?
No. It's not there at all, so it's not creating the record in the DB.
Quote:
f not, the problem could either be with the blocks administration code or with the blocks table, or both
I have no customized code - just the Raven Distro built on a vanilla 7.6 nuke install
Quote:
can you be more specific ?
are you trying to create a block with ONLY text or does it contains html or java script ?
I tried Only text, and I tried creating a block from a Module.
Both do not work. No HTML or JS or any funky stuff.
After I click "Create Block", it submits the page and then the Block admin page reloads, but the block has not been created.
I check the DB with phpMyAdmin and it's nopt created.
Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Mon Apr 17, 2006 8:24 pm
If I am not mistaken you need to create a block-whatever_it_is.php file in your blocks directory before you can administer anything. I believe that the Karakas howto guide covers some of how to do this. I recall seeing some logic that basically reads in all the file names that are in the blocks directory and then treats each distinct name as a block. It is at that point that block administration kicks in.
The documentation is here:
Only registered users can see links on this board! Get registered or login to the forums!
You can create blocks with HTML or RSS, without having a file in the blocks directory. Since he tried to create a text block (via the HTML block function), it seems there is a problem with the blocks table, which is why evaders99 wants to see the structure of that table.
Field Type
===== =====
bid int(10)
bkey varchar(15)
title varchar(60)
content text
url varchar(200)
bposition char(1)
weight int(10)
active int(1)
refresh int(10)
time varchar(14)
language varchar(30)
blockfile varchar(255)
view int(1)
groups text
expire varchar(14)
action char(1)
subscription int(1)
Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Tue Apr 18, 2006 7:22 am
I stand corrected Kguske. I just confirmed it too by creating a test block on my Ravennuke 2.02 test site. Worked like a charm. Just called the block test and put the text "test" into it (using your Wyswig editor I might add) and hit create block and it created it like a charm.
The database structure for a "pure" RN site corresponds exactly to what deadlock posted for his site. The code for creating a block from blocks.php is:
There are 17 fields both in what deadlock posted, in what shows on a structure listing for RN2.02 and in this SQL statement. Unless someone sees an obvious solution here maybe the next step would be to put some echoes into the code just before that SQL statement is executed and to check for and echo back any SQL errors on a test version of the system. Or check the logs and see if any errors show there?
Bloody theme I uploaded (the only non-packaged theme I have) had it's own blocks.php that overwrote mine !!
So - problem fixed.
Thanks guys for pointint me in the right direction !!
I am having the same problem, don't understand the theme having a block.php. Anyway, If I try to create a block it is created. However, the links all go back to the admin Panel. When I try to edit it all the info I put in is gone. Everything was working fine and I upgraded my site and woolah no more html blocks. Really don't like to put version numbers in posts.
Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Tue May 16, 2006 7:15 am
If you are using a theme that replaces the standard blocks.php file perhaps the question should be directed to whoever wrote the theme. It's hard for me to even conceive why a themes author would need to overlay the standard blocks.php file and I'd suggest you just get rid of that theme and restore the standard file. Then people here would have some basis to help without trying to debug a faulty theme.
Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Tue May 16, 2006 6:22 pm
To reply to Deadlock, the code I referenced is contained in your /html/admin/modules/blocks.php file in the function called BlocksAdd.
If somehow yours (blocks.php) got replaced then that is probably the source of your problem. But that's where blocks get added.
To Jnorris, if you are using fisubice and never uploaded the same theme that deadlock did or any other that replaced blocks.php then we have a different problem. Maybe you could explain a little more about what you did in terms of the upgrade process. What distribution? Did you replace your tables entirely or did you change the structure and import the data? Did you overwrite the old PHP programs with RN 2.02.02 or did you copy the RN files into an empty structure?
Joined: Aug 29, 2004 Posts: 9133 Location: Arizona
Posted:
Wed May 17, 2006 6:05 am
jnorris, if you are using an unmodified version of RavenNuke76 2.x, then you probably had an FTP problem and need to re-FTP your files. Raven suggests using Binary mode on your transfer.
O.k. I did not over write my original blocks.php.. version 7.6 chatserv patched 3.2 .. When I upgraded, I copied the old database then updated as recommended by phpnuke(v7.2-7.3-*.* and so fourth). The problem is the same with all templates, I have even reuploaded and done live updates to the blocks.php. Sorry for the long post.
Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Wed May 17, 2006 8:51 pm
I'm just trying to understand at this point. I had to reread this a few times but what I think you are saying is that you are going into blocks administration on the admin panel and in the content field you are entering what is on the first quoted "block" in your post? And the result is what you are getting in the second quoted block.
And if I'm not mistaken when you enter something in the first block (the content area) on the admin panel for blocks, to add a new block, you are using the FCKeditor? I think so but please confirm. If so, maybe someone else here has an answer but I've had a lot of weirdness on my sites with that editor too and I can't rule out that it would so something like that. I'll try to simulate what you entered on a test site tomorrow and report back unless someone else jumps in first or you tell me that I'm not interpreting your correctly.
Joined: Aug 29, 2004 Posts: 9133 Location: Arizona
Posted:
Fri May 19, 2006 6:19 am
Quote:
O.k. I did not over write my original blocks.php.. version 7.6 chatserv patched 3.2 .. When I upgraded, I copied the old database then updated as recommended by phpnuke(v7.2-7.3-*.* and so fourth).
Ok, I think you said the "magic words", although I am still a bit confused with your results. RavenNuke76 2.x comes with NSN Groups installed. Since you upgraded from another nuke database, you might be missing some fields and data. Please post your table schema for the nuke_blocks table here so we can find out for sure.
First of all thank you guys for trying to help me with this issue. Here is my nuke_blocks table.
Code:
`bid` int(10) NOT NULL auto_increment,
`bkey` varchar(15) NOT NULL default '',
`title` varchar(60) NOT NULL default '',
`content` text NOT NULL,
`url` varchar(200) NOT NULL default '',
`bposition` char(1) NOT NULL default '',
`weight` int(10) NOT NULL default '1',
`active` int(1) NOT NULL default '1',
`refresh` int(10) NOT NULL default '0',
`time` varchar(14) NOT NULL default '0',
`blanguage` varchar(30) NOT NULL default '',
`blockfile` varchar(255) NOT NULL default '',
`view` int(1) NOT NULL default '0',
`expire` varchar(14) NOT NULL default '0',
`action` char(1) NOT NULL default '',
`subscription` int(1) NOT NULL default '0',
PRIMARY KEY (`bid`),
KEY `bid` (`bid`),
KEY `title` (`title`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=76 ;
I should not have put that theme reference in my first post. I have only used the themes that do not require my original blocks.php to be modified.
By cahnce is this it?
Quote:
Warning PRIMARY and INDEX keys should not both be set for column `bid`
Joined: Aug 29, 2004 Posts: 9133 Location: Arizona
Posted:
Sat May 20, 2006 12:15 am
No, it is as I expected. Your database does not have the NSN Groups fields. Take a good backup of your database and then run Raven's 2.02.02 installSQL.php script BUT ONLY EXECUTE STEP 2 which says "NSN Groups"!!!!
--
-- Table structure for table `nuke_nsngr_config`
--
DROP TABLE IF EXISTS `nuke_nsngr_config`;
CREATE TABLE `nuke_nsngr_config` ( `config_name` varchar(255) NOT NULL default '', `config_value` text NOT NULL, PRIMARY KEY (`config_name`) ) TYPE=MyISAM;
--
-- Dumping data for table `nuke_nsngr_config`
--
INSERT INTO `nuke_nsngr_config` VALUES ('perpage', '50');
INSERT INTO `nuke_nsngr_config` VALUES ('date_format', 'Y-m-d');
INSERT INTO `nuke_nsngr_config` VALUES ('send_notice', '1');
INSERT INTO `nuke_nsngr_config` VALUES ('version_number', '1.7.1');
ALTER TABLE `nuke_blocks` ADD `groups` TEXT NOT NULL AFTER `view`;
ALTER TABLE `nuke_message` ADD `groups` TEXT NOT NULL AFTER `view`;
ALTER TABLE `nuke_modules` ADD `groups` TEXT NOT NULL AFTER `view`;
Joined: Aug 29, 2004 Posts: 9133 Location: Arizona
Posted:
Tue Jun 27, 2006 8:16 pm
Well, I fail to see how that has anything to do with this at all... Can you explain what you were doing in your block creation that this would have any affect on?
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