Issue with Smartdocs node variables not being initialized properly

Not applicable

Hi,

We seem to have an issue where when we first access a smartdocs page, some of the arrays of the node object such as “field_smart_method_verb” and the “field_smart_method_model” are not being initialized. Thus, when these arrays are indexed [In smartdocs.theme.inc functions _smartdocs_preprocess_node_page() and smartdocs_preprocess_node() ], there are log errors and the page does not load properly. Only when an admin goes to the page does it load properly and from then on the page loads properly for all users. We are securing access to smartdocs with taxonomy access control and have tested all aspects of it but have not found a solution. Some of the log errors are shown below:

Notice: Undefined offset: 0 in _smartdocs_preprocess_node_page() (line 40 of ./profiles/apigee/modules/custom/devconnect/smartdocs/smartdocs.theme.inc).

Notice: Trying to get property of non-object in _smartdocs_preprocess_node_page() (line 41 of ./profiles/apigee/modules/custom/devconnect/smartdocs/smartdocs.theme.inc).

Warning: First parameter must either be an object or the name of an existing class in _smartdocs_preprocess_node_page() (line 43 of ./profiles/apigee/modules/custom/devconnect/smartdocs/smartdocs.theme.inc).

Notice: Trying to get property of non-object in _smartdocs_preprocess_node_page() (line 70 of ./profiles/apigee/modules/custom/devconnect/smartdocs/smartdocs.theme.inc).

Notice: Undefined offset: 0 in smartdocs_preprocess_node() (line 140 of ./profiles/apigee/modules/custom/devconnect/smartdocs/smartdocs.theme.inc).

Screen Shots attached when we use devel to output what is in the node object before and after an admin first accesses the page.

3485-screen-shot-2016-09-06-at-104302-am.png

3486-screen-shot-2016-09-06-at-104338-am.png

Has anyone had a similar issue or any idea what is causing this? Thanks!

@jpasman

1 4 213
4 REPLIES 4

@Neal Parikh , Welcome to Apigee Community.

Is your portal on cloud / onpremises ? Which version of Apigee Developer Portal ? You can find version by navigating to /buildInfo in your portal.

@Anil Sagar , Our portal is on premises. We are running OPDK-4.16.05.01

Not applicable

Hi, is there anyone who is able to help with this issue?

@Anil Sagar @Gitesh Koli - any progress on this issue? We would like to fix this issue before our next release.