Closed (fixed)
Project:
Services
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Oct 2010 at 22:23 UTC
Updated:
15 Jan 2011 at 11:22 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| services-issue-tbd-fixdisabledpropertycheck.patch | 1.78 KB | johnstorey |
Comments
Comment #1
voxpelli commentedDisabled is a property added by Chaos tools - it isn't part of the schema.
Comment #2
johnstorey commentedThat'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.
Comment #3
kylebrowning commentedIs this still an issue? I havnt been able to reproduce this error.
Comment #4
kylebrowning commentedI 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
Comment #6
voxpelli commentedFollow up patch at #1027884: Use Chaos tools system for enabling/disabling endpoints - I think this issue was solved in the wrong way.