In one of my module, i call the function views_embed_view() when a new node is created. When I am connected as an administrator, it works. When I'm connected with another user (who have access to this view), it returns "

" without any data for the same request...

Doesn't anyone know why? In the alpha1 version, it works very well.

Thank you

Comments

dawehner’s picture

You call views_embed_view on the same request as the creation of the node?

This is just assuming because you couldn't provide an export:
Is problem could be a caching issue. You could node_load($nid, NULL, TRUE); to be sure to clear the load cache.

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)
jlaurin’s picture

I call views_embed_view in my implementation of hook_node_insert.

While i was waiting for an answer, i installed the dev version of Views and I no longer have the problem mentioned.

I will try a node_load in the beta3.

merlinofchaos’s picture

Status: Postponed (maintainer needs more info) » Fixed
dawehner’s picture

If it's fixed in the dev version so feel free to use it. In general the dev version has much less bugs than the beta3.

Status: Fixed » Closed (fixed)

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

MauPalantir’s picture

Version: 7.x-3.3 » 7.x-3.0-beta3
MauPalantir’s picture

Version: 7.x-3.0-beta3 » 7.x-3.3

I got the same problem with 7.x-3.3.

MauPalantir’s picture

Version: 7.x-3.0-beta3 » 7.x-3.3
Status: Closed (fixed) » Active
dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

@Mau Palantír

If you reopen an issue can you please explain why? What are you doing exactly etc...

damiankloip’s picture

Why do people want to embed a view in hook_node_insert??

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)