First off context rocks !!!!

I have a view that lists 5 events on each page. Context works great for the first page, but when I use the "pager" to move to the second page my blocks disappear.

I have tried the following for conditions:
node type: event
path: event/* a
views: selected the events view I created.

I am sure there is a simple fix but I couldn't find it.

Thanks in Advance.

Comments

kclarkson’s picture

Just figured out a solution.

In my view I clicked on the gear icon next the the user pager.

On the Pager ID option I gave it a number of: 1

While this does fix my context blocks from disappearing I now have a crazy link for the 2nd page of a view. It is now something like: blog?page=0%2C1 , instead of the nice blog?page2.

Anybody have a clean solution?

Thanks,

Steven Jones’s picture

Status: Active » Needs work

It really shouldn't matter which views page you're on. Needs work and a test.

Danny Englander’s picture

Subscribing, I am having the same issue. The Pager ID hack in #1 works but as mentioned the URL is not very friendly.

nsyll’s picture

thx @kclarkson your dirty tip work for me

kclarkson’s picture

@Steven Jones.

I agree that it shouldn't matter what page you are on, while the fix I listed worked.

Do you have another solution that would give us a nice clean URL?

When you say needs work and a test, what exactly do you mean?

Thanks again,
K

Steven Jones’s picture

Sorry, I mean that the code needs working on and will need a simpletest to ensure that it is fixed.

vishun’s picture

Worked great for me, I've never noticed this option before but its definitely good to know. Also note that I don't have the extra characters for some reason, seems to be clean ?page=1 but perhaps that's because it wasn't a views page. For me the problem was the first page of a solr search results page, a views block was working fine while on subsequent pages it disappeared. Thanks a bunch ;)

zkrebs’s picture

#1 worked for me - strange and weird little bug.

goldlilys’s picture

#1 worked for me too without side effects. Weird, what does page id in the views do anyways? This is a weird bug and hopefully be added to the new release. Thanks.

Actually not context, but this is a views bug because this happened to me when using the normal blocks to place block items.

kclarkson’s picture

Version: 6.x-3.0 » 7.x-3.0-beta4
Status: Needs work » Active

I am having the same problem as two years ago but with the 7.x-3.0 version.

Just wondering if the maintainers are aware of this issue and if it is designed to work this way.

Thanks,

tekante’s picture

I am unable to replicate this report. I created a context which places the who's online block in the second sidebar region, set the condition to use the view (also tried separately with a condition set on the path) and the block was correctly placed on the first page of the view and subsequent pages. Can someone provide detailed instructions on how to replicate this issue?

enapoleone’s picture

I'm currently also having this issue. The workaround works but the URL is just not clean. I've also tried using Clean Pagination, setting a path condition to e.g. blog/* and it still doesn't work.

I'm trying to add a block to the second sidebar of a view. I can set the condition to be either View or Path or both and when the view is on the second page or more my block does not show in the defined region. Interestingly, if I turn on Context Inspector it tells me that it is aware of the context on the second page and where it is supposed to appear. What could be standing in the way of the context from rendering?

enapoleone’s picture

I solved my issue when I realized I created a context that was adding a paginated View as a block to another paginated View. The block View was set to use paged output and display more items than were available. Therefore when the main View was on the second page or more the block View had no more items to display. If I change pagination to display all items, then the block appears on every page of my View.

Now I have to figure out how to combine paginated views.

marcoka’s picture

Issue summary: View changes

this is great. i have a view with a page and a views block (no pager) it just disappeard on pager pages. setting id to 1 solves this. soooo much thanks guys.

kip stanning’s picture

didn't really get into the discussion. read solution in #1 and it worked. thx @kclarkson!!!

Roden’s picture

I came across this issue recently, too. A pane in a panel had a pager which caused views outside the panel to disappear. The solution in #1 works and is not too ugly because its quite common for 2nd pages.. Though if there is a better solution, I'd like to hear it!