In Services 3, D6, if you have at least one endpoint and flush caches, line 136 of services.module will attempt to access a 'disabled' property of the endpoint. Unfortunately the endpoints have just been loaded with ctools_export_load_object, and the schema there has no such property. The end result is an error message on the screen.

I have added property_exists() call to check for this condition, and not attempt to access the disabled property on the endpoint object when such property does not exist.

You, experienced services developer, I rely on to tell me if I have done the correct thing, or if the schema should be expanded to actually have a 'disabled' property.

Comments

voxpelli’s picture

Disabled is a property added by Chaos tools - it isn't part of the schema.

johnstorey’s picture

That's funny because, well ... it's not. I'll look deeper and see if I can figure out why. Thanks.

(later)

I can see where CTools does set the 'disabled' property, but none of that code is executed as a result of services calling ctools_export_load_object. Hence the bug we are seeing. I see where 'disabled' is listed as reserved in the Advanced Help documentation for CTools, but there is no guarantee it will be used. Are you thinking this is a bug in CTools then? If not, we should guard against the case that we see right now.

kylebrowning’s picture

Is this still an issue? I havnt been able to reproduce this error.

kylebrowning’s picture

Status: Needs review » Fixed

I have actually fixed this by removing the line and adding in the ability to disable and enabled endpoints.

Fixed in 6.x-3.x-dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

voxpelli’s picture

Follow up patch at #1027884: Use Chaos tools system for enabling/disabling endpoints - I think this issue was solved in the wrong way.