This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

4.7 Module Upgrade, getting warning: implode(): Bad arguments error

I upgraded to 4.7 over the weekend, including refactoring some of the modules I had written.

One is for a module about procedures, it has a _block function in it. The overall module works, but when I use the block I get this error on the "create content" pages. I suspect this is a bug in my code - since other blocks are setup and not throwing this.

warning: implode(): Bad arguments. in /home/vividselfadmin/public_html/modules/node.module on line 363.
user warning: You have an error in your SQL syntax near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/vividselfadmin/public_html/includes/database.mysql.inc on line 124.

Full Block code is:

<?php
/**
* Sidebar block for procedure, with callout info
*/

function procedure_block($op='list', $delta=0) {
// listing of blocks, such as on the admin/block page
if ($op == "list") {
$block[0]["info"] = t("Procedure Sidebar");
return $block;
} else if ($op == 'view') {

$node = node_load(arg(1)); //get the current page node info
if ($node->type != 'procedure') {
return;
}

anyway to have TinyMCE recognize PHP pages

Is there any setting/config to let TinyMCE recognize that a pge is PHP code (like if pahe content starts with php tag.

I just started using Tiny and all was well until i went to edit one of my existing pages which was PHP code - Tiny corrupted the code. Even if after first going to edit page i switched off "rich text" it was too late.

I now have default set to not use Tiny.. but most of my pages are simple HTML so it is a pain to have to turn Tiny on every time.

Thought maybe someway to do this...

anyway to have TinyMCE recognize PHP pages

Is there any setting/config to let TinyMCE recognize that a pge is PHP code (like if pahe content starts with "<?php"

I just started using Tiny and all was well until i went to edit one of my existing pages which was PHP code - Tiny corrupted the code. Even if after first going to edit page i switched off "rich text" it was too late.

I now have default set to not use Tiny.. but most of my pages are simple HTML so it is a pain to have to turn Tiny on every time.

Thought maybe someway to do this...

How to create a book contributor module

I am asked how to create a module which presents all the book contributers, just like http://drupal.org/node/14205.

I think it would be possible to get the information by finding the book root node, and then traverse it and all childnodes an extract the uid from node.

But how do I actually include this in within an actual book. I mean, I must create a special contributor module. That is simple enough, but does it have to mimic book module, in order to be incorporated into books, or...?

timezone function

hello, I'm working in a module, and I have to store dates and times of some events, but I want to store the UTC instead of the local time, because I want to show the events in the timezone of the users....

There is any function in drupal for timezone conversion?

Forum module brocken?

Is the forum module bust in 4.6? Ive been building a site and have just started on the forum section and have a couple of rather major problems:

- forum posts are promoted to the front page by default
- forum posts are not displayed in the forums

Is the forum known to work in 4.6?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions