For an unknown reason #944362: Attempt to accesse non-existent property was solved by bypassing Chaos tools system when the actual fix would have been to change a "if (!$endpoint->disabled)" into "if (empty($endpoint->disabled))".

This has lead to loss of functionality such as defining enable-status in the exports and to enable and disable exports without having to save them to the DB. It's also completely unnecessary to have an entire column in the database for the status - Chaos tools uses a variable instead.

I'm attaching a patch that restores the use of Chaos tools own system for enabling and disabling endpoints.

Comments

voxpelli’s picture

StatusFileSize
new5.3 KB

A patch without prefixes is attached - forgot that not everyone uses Git.

kylebrowning’s picture

StatusFileSize
new3.19 KB

That patch didnt apply, and when I re-rolled it, I was not able to disable an endpoint.

This is my patch that allows that, once its reviewed ill commit.

kylebrowning’s picture

Upon future thought, why dont we remove ctools as a dependency and if it exists we enabled exporting and disabling via ctools.?

voxpelli’s picture

Status: Needs review » Needs work

I see no point in making Ctools optional. Especially not in Drupal 7 as Views also uses Ctools and thus most people will have it installed.

Something is weird with your patch - dreditor doesn't understand it at all. Did you generate it with an ordinary "git diff --no-prefix"?

It did apply locally though so here's some feedback:

1. The disable behavior in my patch is copied from all other modules using Chaos tools export feature and is the expected behavior for exported data. I think we should stick to the established behavior instead of modifying it. We gain more from being mainstream than from the minor enhancements in my opinion.

2. You didn't include the modified test case in your patch - why?

3. Please don't include coding style fixes in your patches - you have three lines of coding style fixes in your patch that wasn't included in my patch. Coding style fixes are best fixed as separate patches.

kylebrowning’s picture

Status: Needs work » Patch (to be ported)

I accidentally committed this when attempting to push a fix for node_resource.

Its the patch in #1 applied correctly.

needs port to 6.x, incomming.

kylebrowning’s picture

StatusFileSize
new3.19 KB

Heres dah 6.x patch.

kylebrowning’s picture

Status: Patch (to be ported) » Needs review
kylebrowning’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
kylebrowning’s picture

Status: Needs review » Closed (fixed)