User login

Drupal Development

Order of things in crazy form-within a form

NOTE: This refers to order of processing the form, not display.

Of passing interest. Ran while debugging. Still haven't figured out how to add stuff to the form that will be accepted by the subform.

The order of things:

• action_node_form
• fix subform
• nodeapi validate
• combined action submit
• action_node_form
• action_node_form already_submitted
• addnid
• subform
• Your Action set has been created.
• nodeapi insert
• Your Action has been created.

Linked to from group versus unlinked node creation

(This matters to Agaric because we're doing all kinds of crazy stuff to stick the action set (organic group) creation on the same form as the action (node that belongs to organic group).)

[#action] => /eng/node/add/action

becomes in the linked group:

[#action] => /eng/node/add/action?gids[]=233

That's the only difference.

if (!isset($form['og_nodeapi']['invisible']['og_groups']['#value'])) {

Usernode module causes nesting level too deep (recursion) in Devel's Macro module

So-- is the problem devel's macro or Agaric's custom module and/or configuration?

Nesting level too deep - recursive dependency macro
usernode recursive

not relevant, but probably very useful as Drupal goes more OOP:
http://www.bigroom.co.uk/blog/php-nesting-level-too-deep-recursive-dependency/

<

Interesting date warning to keep in mind

Caused by Event.module:

2048 date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead

basically i think it's saying event.module does not follow date best practices

Date thing filed for future reference.

Wasted a lot of time with Filemerge insisting huge paste was one line

Wasted a lot of time trying to compare the results of two drupal_set_message print array wrapped in pre tags, copied out of the browser.

Various text editors treated it as having multiple lines (around 3,000 lines, in fact) but FileMerge insisted that it was one giant line. I tried saving, again with multiple editors, to Unix line ending type. I do use Unix-style line breaks by default ("LF") but this had no effect.

Anyone have any experience/advice on this?

FileMerge uses diff, and it doesn't work in diff either.

Silly devel error

function
file: line
arguments
warning: Invalid argument supplied for foreach() in /var/www/wsf2008/modules/contributed/devel-5.x-1.x-dev.tar/devel/devel.module on line 1033.
devel_query_table
/var/www/wsf2008/modules/contributed/devel-5.x-1.x-dev.tar/devel/devel.module: 501
,
devel_shutdown

Queries taking longer than 5 ms and queries executed more than once, are highlighted.
ms
#
where
query

Using devel and getting this error?

Form munging, nothing figured out

This, in the [#post] array of $form that resulted directly from drupal_execute, makes it look like it would be so easy to modify before final submit:

Action set organic group as passed through subform versus standalone

case 'validate':

drupal_set_message('

' . print_r($node, TRUE) . '

');

Differences are uid, name: zero and blank in the subform, rather than set to the current user.

A couple places on the subform that are blank, rather than zero on the standalone form: promote, sticky, og_register

Resolution

Interim almost have ability to add onto a form before post

Actually, Agaric can add onto the form before submitting with this code in form_alter, action_node_form hook, to catch and stop repeats of drupal_execute.

Standalone versus embedded action set (organic group) submissions

Important differences:

The differene already noted in the #node comparison-- no node author name.

$form['#node']->name = 'Username'

And the same username difference, but in a different place:

$form['author']['name']['#default_value'] = 'Username'

blank in embedded

standalone:
$form[#action] => /eng/node/add/action-group

embedded:
$form[#action] => /eng/node/add/action

standalone (embedded subform has NO token information):

Syndicate content