Hi,
I've encountered this bug randomly in view pages.
I have a block in home with ajax facets that works perfectly as designed.

But in view page the POST variable ajax_facets['view_name'], which is mandatory in order to render the ajax refresher accordingly to line 21 of ajax_factes.pages.inc

 $name = $_GET['view_name'];

and so the line 27 throws a php fatal error when tries to get the view because $name is empty:

$view = views_get_view($name);

as you can see in image attached, throws a 500.

everything in the view restart to works smoothly when i disable ajax faceting and using standard old-style links.

Report also that Pretty paths destroys the ajax faceting completely as i needed to evict it.

CommentFileSizeAuthor
view_name_is_empty.JPG112.33 KBandsigno82

Comments

andsigno82 created an issue. See original summary.

eugene.ilyin’s picture

Status: Active » Postponed (maintainer needs more info)

Hello

Report also that Pretty paths destroys the ajax faceting completely as i needed to evict it.

It's not implemented yet.

About random bug. It's good catch, but for me it's not easy to correct it because it's random. I need more details.

andsigno82’s picture

I meant "random" as the block in home works.
But actually, every new view page i create, suffers this bug.

eugene.ilyin’s picture

Can I check it somewhere online? I don't need admin access.

andsigno82’s picture

I sent you a PM :)

eugene.ilyin’s picture

Status: Postponed (maintainer needs more info) » Active

We had conversation with Andrea. So the problem is that some view (based on search api index) can be executed but not used on the page. Ajax facets requires view name and it takes it from JS settings.

JS settings prepared in function ajax_facets_add_ajax_js();
Sometimes there can be set wrong view name.

It can help to anybody in debugging.

Right now I don't have ideas how it can be corrected on the side of module ajax_facets. I think that it should be corrected on the level of environment of specific project.

andsigno82’s picture

Eugene lead me to right path!

Is important to tell core block system to show facets ONLY WHERE NECESSARY. in my case, facets of search index #2 overlapped facets of search index #1 in view page.
Once set search index #2 facets to appear only in proper page, view page with search index #1 restarted to work!

This issue could be fixed with a little documentation in facetapi

andsigno82’s picture

Component: Code » Documentation
Status: Active » Needs review
eugene.ilyin’s picture

This issue could be fixed with a little documentation in facetapi

Great, but you should create separate issue for facetapi. Here is module ajax_facets :)

So, then can I close this issue?

andsigno82’s picture

Great, but you should create separate issue for facetapi. Here is module ajax_facets :)

So, then can I close this issue?

Of course Eugene, I totally agree with you and wrote that comment in order to refer it in the facetapi issue i'll open :) :)

Thanks for all your precious support and feel free to close ticket.

eugene.ilyin’s picture

Great. Thank you for active participating in Drupal community.

eugene.ilyin’s picture

Status: Needs review » Closed (fixed)