0

The Feature included a menu link, main menu, 2 views, and a custom content type. Now I am getting a warning on cache clearing on my local and dev site. Never saw it before when clearing cache, and one of the views is not loading the content items.

They do load for admin. I have tried setting the view permission to none, to role anonymous, removed sorting by published content, and returning NODE_ACCESS_ALLOW in the module's hook_node_access().

The full drush warning is

class_exists() expects parameter 1 to be string, array given handlers.inc:34

and the watchdog output that corresponds seems to be

Warning: strnatcmp() expects parameter 2 to be string, array given in token_asort_tokens() (line 575 of /home/example/public_html/sites/all/modules/token/token.module).

I'm at a loss for how all these components interact, or if they are even related.

Edit: module.info file

name = Example
description = Example description
core = 7.x
package = Features
version = 7.x-1.0
dependencies[] = course
dependencies[] = menu
dependencies[] = references
dependencies[] = text
dependencies[] = views
features[ctools][] = views:views_default:3.0
features[features_api][] = api:2
features[field_base][] = field_example_key
features[field_base][] = field_example_passcode
features[field_instance][] = node-example-body
features[field_instance][] = node-example-field_example_key
features[field_instance][] = node-example-field_example_passcode
features[menu_custom][] = main-menu
features[node][] = example
features[views_view][] = example_sessions
features[views_view][] = examples
features_exclude[dependencies][ctools] = ctools
features_exclude[dependencies][features] = features
features_exclude[menu_links][main-menu_examples:examples] = main-menu_examples:examples
4
  • are you using tokens anywhere in this new feature? Commented Aug 16, 2016 at 1:45
  • I didn't explicitly click anything that said tokens, but when I installed the module on the dev server it said I needed the uuid module for it to work, so I installed that. Updating question with module.info file.
    – Tom Mertz
    Commented Aug 16, 2016 at 16:20
  • hmm, so I can only offer a wild guess: based on the components of your feature, I think only Views could be using tokens. So the view you imported with the feature might be referencing something that uses tokens in another way than your local is set up. Try to disable the view and see if the error goes away, Commented Aug 17, 2016 at 0:28
  • I tried and even disabling the feature completely and then trying to manually delete the view out of the database, but that warning is still happening. So I'm no longer sure if it's even related to the view. I have found out how to get content to display and it seems unrelated. I'll just deal with the warning for now. Thanks for the help!
    – Tom Mertz
    Commented Aug 17, 2016 at 20:29

1 Answer 1

0

I was able to get the view to display data by Disabling SQL rewriting in the view.

In the view under Advanced > Other > Query Settings: Settings > check Disable SQL rewriting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.