Support from Acquia helps fund testing for Drupal Acquia logo

Comments

deviantintegral’s picture

Here's a patch that adds settings to the user edit form and pulls them into node forms.

URNA default settings.jpg

deviantintegral’s picture

Status: Active » Needs review
FileSize
7.92 KB

Here's a patch adding the 'make default' button.

deviantintegral’s picture

Here's a patch that fixes a bad return value. Also, a backport to 6.x-1.x.

Status: Needs review » Needs work

The last submitted patch, 1273550.3-default_node_access_settings-6.x.patch, failed testing.

deviantintegral’s picture

Status: Needs work » Needs review

Oh testbot.

deviantintegral’s picture

There was an issue in the 6.x patch that caused duplicate wrapper IDs when setting the default settings from a node. It's not an issue in the 7.x patch.

Status: Needs review » Needs work

The last submitted patch, 1273550.6-default_node_access_settings-6.x.patch, failed testing.

deviantintegral’s picture

Status: Needs work » Needs review
Berdir’s picture

The attached patch fixes a notice I got. If you see a better way, please improve it.

I like this patch and I think it it improves the module a lot and gets a step further. It would be lovely to have some tests for this module, but I'm going to commit this soon..

Sorry for letting this and your other patches wait for so long...

deviantintegral’s picture

Your change seems reasonable to me. I'm not sure if a cleaner way to do it given how tied the form is to hook_node operations.

deviantintegral’s picture

The original parameter of $type was causing a scoping issue so that node settings were always becoming the defaults. This patch changes the parameter to be $object_type instead.

deviantintegral’s picture

An update to the 6.x-1.x patch that fixes a warning from a bad runtime call-by-reference copy/paste.

Status: Needs review » Needs work

The last submitted patch, 1273550.12-default_node_access_settings-6.x.patch, failed testing.

Berdir’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Needs work » Needs review

Thanks, let's get this moving, commited. Thanks for your patience!

Moving to 6.x, leaving it for mrf to decide if he wants to add new features at this point.

Berdir’s picture

Status: Needs review » Needs work

The last submitted patch, 1273550.12-default_node_access_settings-6.x.patch, failed testing.

Berdir’s picture

Looks like the tests try to run the Views tests:

[17:10:05] Command [/usr/bin/php ./scripts/run-tests.sh --concurrency 8 --php /usr/bin/php --url 'http://drupaltestbot699-mysql/checkout' --file sites/default/modules/user_relationships/user_relationships_api/tests/user_relationships_api.api.test,sites/default/modules/user_relationships/user_relationships_api/tests/user_relationships_api.socnet.test 2>&1] failed
Duration 0 seconds
Directory [/var/lib/drupaltestbot/sites/default/files/checkout]
Status [255]
Output: [PHP Fatal error: Class 'ViewsSqlTest' not found in /var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/views/tests/views_exposed_form.test on line 7].
[17:10:05] Encountered error on [review], details:
array (
'@reason' => 'failed during invocation of run-tests.sh',
)
[17:10:05] Review complete. test_id=183604 result code=8 details=Array
(
[@reason] => failed during invocation of run-tests.sh
)

I think that's a known issue, so for now, ignore test fails...

deviantintegral’s picture

Status: Needs work » Needs review
FileSize
9.8 KB

Looks like I placed your earlier PHP warning fix in the wrong place when I backported it to D6. This patch fixes that.

mrf’s picture

Issue tags: +6.x-1.1

I am up for including this feature in 6.x since it is pretty much a straight backport from 7. My main concern with new features for 6.x was focusing my energy away from the long list of known bugs, but this looks like it is already ready to go.

Give me some time to run through this myself and I'll add it in to 6.x.

deviantintegral’s picture

Assigned: deviantintegral » Unassigned
FileSize
13.55 KB

Thanks mrf for looking at this.

There was an issue with the previous patches if nodes were created without going through the form system. As the nodeapi prepare hook wasn't implemented, default settings weren't applied to raw nodes saved with node_save(). I ran into this specifically with the plupload module. The attached patch adds that, as well as fixes the indentation of the switch block.

As the 7.x code has been committed, I'll open up a separate issue for that.

mrf’s picture

Closed #690558: post to social network to have default value as a duplicate of this issue.

mrf’s picture

Status: Needs review » Needs work

I did some manual testing of the patch, all the ur node access settings still save and function properly, but when I click the save defaults button those defaults aren't displayed when I create a new node of that same type.

When I click the 'save defaults' button the throbber seems to go away too quickly, so maybe the ajax just isn't saving properly?

deviantintegral’s picture

Status: Needs work » Needs review
FileSize
13.99 KB

Here's a patch that fixes setting the wrong defaults for new nodes due to setting an invalid array for $node->user_relationship_node_access.