My views displays aren't showing correctly, no matter how much I make sure they're typed in correctly in the settings example (even with the slight view display textfield bug I posted a little bit earlier being fixed). It looks like Drupal is completely ignoring the "display" part of the request from my compiled app.

A simple test is trying out on your own site.. eg:

http://www.yourwebsite.com/phonegap/display_view?view=news&display=recent
http://www.yourwebsite.com/phonegap/display_view?view=news&display=popular
http://www.yourwebsite.com/phonegap/display_view?view=news&display=whatever

All these views will show the same result, as if the query was simply:

http://www.yourwebsite.com/phonegap/display_view?view=news

Comments

jonanthony’s picture

Status: Active » Closed (duplicate)

Closing this as it is a duplicate of the other post.

irous’s picture

Status: Active » Closed (duplicate)

(dupe)

irous’s picture

Status: Closed (duplicate) » Active

Actually, this isn't a duplicate. I should have made it clear that this thread and the other thread I made are two are entirely separate issues, even though they both relate to the views display data getting pulled not being correct as a result.

The other issue was a html/javascript issue in the settings part of the Android example files, while this is an error with the Drupal module itself, I believe. Even if you fixed the error listed in the other thread, this issue will still persist.

The example I gave in this thread earlier show that if you send the query through manually to your drupal site (sidestepping the Phone gap example files / compiled app), it won't get the specific Views Display data you're after.

For example, say I have a view called "frontpage", and the first display is called "page" and a second display called "block1", and the third is "block2". If I want the "block2" display, phonegap will send a query to my site as such:

http://www.yourwebsite.com/phonegap/display_view?view=frontpage&display=...

..but then it will incorrectly return the "page" display. In fact, even if I request the "block1" display, it still won't return the correct display of "block1". It will only and always show the first display : "page". My theory is that the module is ignoring the "display" part of the query so as a result is always defaulting to the first display in the view, which in this case is "page".

It's pretty easy to double check it yourself, when you have the time. Just to add, I do very much appreciate your work and effort on this module. :)

irous’s picture

Status: Closed (duplicate) » Closed (works as designed)

Arrrgh.... I've finally figured it out... you need to use the Machine Name! Even for the Views name as well!

I've been entering the display name e.g: "latest_news" etc.. or even "popular", "recent" etc that may have been there by default. Mouse over those display names in Views to get an idea of what you need to use (or under 'other' in the advanced column on the right, where it lists the "Machine Name"). It's mostly always "page_1", block_1", or "block_2" etc...

Apologies for the confusion.

irous’s picture

Issue summary: View changes

Slight text correction to make things clearer