2

I've been making this cordova app against this casting agency website, and I've come across this nasty situation where I need to list each user's created nodes. For this purpose, I have created a view with the contextual filter uid and it's taking the uid from the logged user. I also have this fiddle where I am trying to list each user's nodes. However, it's returning empty (2nd ajax call). The weird thing is, it lists the nodes by the logged in user on this URL username is tolga and password is 111222.

The steps I have taken to debug:

  • Hardcode the username and password.
  • Hardcode the uid in the 2nd ajax call without deleting the 1st one.
  • Delete the 1st ajax call.
  • After deleting the 1st call, hardcode the uid in the 2nd call.
  • After deleting the 1st call, not pass the uid at all because I have configured the contextual filter to take the uid from the logged in user.

Nothing worked. Am I missing something? Do I need to use something like Services Views?

UPDATE: I tried using Services Views, and I ended up a whole lot of 404: Resource not found messages. Docs for the module and views say different things for path; docs say http://www.example.com/<endpoint-path>/views/<view-name> while the view says to put the path name after the endpoint path (in my case, services)

4
  • Just to clarify.. Is the issue the ajax contextual filter value is not working with the view? In the fiddle it is showing your list of nodes like your example data via console (which is a success in your 2nd ajax call)
    – DMAC
    Commented Aug 31, 2015 at 22:02
  • @DMAC are you seeing nodes as empty? Because it's not empty. I see it empty as well.
    – Kartagis
    Commented Sep 1, 2015 at 3:46
  • You don't need to use views in between end point. Your path would be like http:// www.example.com/ <endpoint-path>/ <view-name> and need to enable services for this views service.
    – vgoradiya
    Commented Sep 1, 2015 at 5:41
  • 1
    @DMAC my bad, the URL was not showing nodes as empty, I had changed the view and it was because of that.
    – Kartagis
    Commented Sep 1, 2015 at 6:01

1 Answer 1

1

I found out the hard way that what was not working on jsfiddle.net was actually working on mobile. I wasted my own evening on this issue :S Thanks for all the comments though guys.

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.