backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

Views Pager - More Link not working #3910

Open stpaultim opened 5 years ago

stpaultim commented 5 years ago

Description of the bug The "More Link" on the page for views is not working.

Steps To Reproduce I will come back later and try to create better steps, but for now I've created a view with test content. I checked the "more link" on the pager, but when I display the view and click on the "more" link, nothing happens.

I tested this with two different sites and different types of data. I don't know if this was working before.

Page_View__Content____Backdrop

Actual behavior

Expected behavior

Additional information Add any other information that could help, such as:

olafgrabienski commented 5 years ago

Confirmed! Tested in 1.13.x with a page display. The "more" link just points to the path of the views page.

indigoxela commented 5 years ago

The problem is, that the option for the view link url seems to be missing.

In Drupal 7 it's below "Advanced | Other | Link display" Setting the "more" link has never been very user friendly in Drupal 7, but in Backdrop I don't find that setting anywhere.

Drupal 8 puts the setting directly to the link text setting below "Pager".

stpaultim commented 5 years ago

I don't know if this was necessary, but I tested an older version of Backdrop, version 1.9.x-dev to see if the problem has been around a while or recently introduced. I'm seeing the same problem in 1.9.x-dev.

indigoxela commented 5 years ago

Ah, got it... the setting is there, but only under certain conditions.

It happens in core/modules/views/plugins/views_plugin_display.inc

'#description' => t("This will add a more link to the bottom of this view, which will link to the page view. If you have more than one page view, the link will point to the display specified in 'Link display' section under advanced. You can override the url at the link display setting.")

So the thing is, that the "More link:" setting (to use one) is always there, but the "Link display:" setting beneath "Other | Link display" (override the default url) only appears for displays not using a path, hence not for pages.

More precise: in class views_plugin_display, function uses_link_display() { return !$this->has_path(); } checks whether or not to show the setting to override the url.

By default the url is the one of the first page display. This works correctly for blocks. It is also possible to set the "more link" for pages, but it's impossible to override the url there.

It's not actually a bug, but it's a horrible, horrible user interface and it's the same as in D7.

This is a screenshot of the setting, I'm talking about (block display):

screenshot-views-link-options-block