Posted by ycshen on May 17, 2013 at 1:00pm
大家好,
今天我碰到一个问题希望大家可以给我提供一些帮助。
我使用views建立了一个page的display,用的style是table。
每页显示10各项,每一行都有delete的删除项。
事件:
总共有11个内容时,第一页有10个项,第二页有1个项。当我在第二页将那个item删除之后,因为destination的作用view又跳转到第二页,这时第二页是没有内容显示的,因此会显示空白。
请问这种情况如何解决?最好是比较通用的方法。

Comments
VBO不行吗?
VBO不行吗?
人人为我, 我为人人。
这个和vob没关系,我又不做批量。就是删除单个node跳转
这个和vob没关系,我又不做批量。就是删除单个node跳转回来之后找不到原来的view页面了,翻页的问题。
找准问题的本质
本质是views page对于不存在页码的处理。可以考虑干预这类访问的跳转,使它去你要求的页面。
Love, Peace and Drupal
我觉得通用的方法应该是
不需要解决。如果只是显示空白页面,感觉可以接受。但是如果像大卫所说的连分页都消失了,使得用户没有链接回到第一页,那应该是个问题。
We need action!!!
对于destantion中page的参数处理肯定是有条件的
对于destantion中page的参数处理肯定是有条件的,如果做得好是不会出现你说的情况的。
我同意dave的观点,对于delete连接上的destination修改。而且我已经在着手进行patch。完成后会和大家分享这个解决方法。
Could it be a bug?
Hi guys,
I discussed already a little bit with @ycshen and tried to understand more about this problem.
After doing some tests, it seems after the unique record on page 2 (for example) is removed (as described in the initial post), user is redirected to an empty page 2, with no pager and empty message displayed....
Most likely, because I would guess the query is run by Views for page 2, so there would be something like
LIMIT 10, OFFSET 10in the query which returns an empty results set (since a record has just been removed).From a usability standpoint, I think there might be a problem:
After getting back to the page, there is no more pager and only an empty message text is displayed, which could be confusing and disturbing for any user whether experimented or not.
The fact that there is no pager displayed anymore is also annoying because there is no way to browse to any of the previous pages (with the same filter and sort values, for example) without changing the URL manually....
Any other link that would be clicked would lose the selection for any of the filters, sorts, etc... selected for the views (before the delete operation)
To take a very concrete example, that would be very likely to get users confused, with the Commerce Wishlist module:
User browses page 2 of own wishlist view page, deletes the unique item of page 2.
After getting back to page 2 a message is displayed:
No products have been added yet.when actually there is at least a page full of products in the wishlist....
Personally, I'm not completely convinced this would be the best behavior for redirecting users after the delete operation.
We have already tried to look for a similar issue that would have been reported in the Views issue tracker, but so far we were unable to find any ticket that could be closely related with this problem.
Therefore, we would greatly appreciate if anybody could indicate any existing ticket that could correspond to this problem.
@ycshen and I have already started checking a little bit more in depth/code what could be a possible source/origin of the problem and tried to work on potential solutions, suggestions or work-arounds.
In any case, I assume this is a discussion that would be brought to the Views module at some point.
We would greatly appreciate to have your feedback, comments, ideas, suggestions, testing, issues or concerns on any aspects of this comment, problem or post in general.
Thanks in advance to all for your feedbacks, comments, questions, testing and reporting.
Cheers!
thank you for your help
thank you for your help
根据 @DYdave 的帮助,
根据 @DYdave 的帮助, 我在views和eck模块打了相应patch,解决了这个问题。
如果大家有兴趣的话可以帮我测试这2个patch,提出意见参与讨论。
issue链接如下:
eck (delete link)
views (node delete link)