I noticed that, even though the API supports a "field" element for table columns, the URL will contain the "data" element as a sorting parameter.

As an example, if a header column is defined in the following way:

$header[]=array('data'=>t('Number'),'field'=>'id','sort'=>'asc');

The column head in the table is titled 'Number'. The query string in the link is "?sort=desc&order=Number".

"Number" is not supposed to be an identifying title of the field, that's what "id" is. In fact, if the site is localized to other languages, "Number" will change to other, unpredictable values.

From the documentation of the table API, it seems that it would make more sense if the query string contained "?sort=desc&order=id".

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

isaac77’s picture

Version: 5.x-dev » 4.7.6
Priority: Minor » Normal

This also seems to be a problem in 4.7, unless I'm misunderstanding something. Currently, sorting of tables on my 4.7-based site breaks as soon as the column titles are translated.

These tables are generated by Views module, so just figuring out a way to apply t() to the column titles required a bit of work... and now sorting seems to break.

The following code from tablesort_header seems relevant:

$cell['data'] = l($cell['data'] . $image, $_GET['q'], array('title' => $title), 'sort='. $ts['sort'] .'&order='. urlencode($cell['data']) . $ts['query_string'], NULL, FALSE, TRUE); 

As a workaround, I may have to incorporate this code -- with slight modifications that will generate the link based on the field name rather than the translated label -- into a theme override.

Anyone with more in-depth understanding of the whole system have thoughts?

ukdg_phil’s picture

I'm not sure how others feel, but I'm not always too keen on letting my database field names be viewed by the public, as its a potentially (although pretty small) security risk (IMOH).

I may be too paranoid here, & in most situations it may be ok to use, but I can see circumstances where it could be an issue & this is possibly why the title was chosen as the sort parameter id? (just a guess)

Perhaps it could default to using either the 'field' (as Arancaytar suggests) or the 'data' (current default behaviour) info by default, and add an optional argument along the lines of 'sort_var' that could be used to force a specific value to use in the 'order=' clause.

cburschka’s picture

Admittedly, my argument about localization doesn't really apply - if the page internally uses t("Number") to compare the get parameter to, that will work. Well, unless the site is localized to two different languages and one user tries to send someone with the other language setting a URL.

Perhaps sort_var really is the way to go.

cburschka’s picture

Title: tablesort_header() - sort url » tablesort_header() - order and sort arguments
Version: 4.7.6 » 7.x-dev
Category: bug » feature

The sort_var addition still strikes me as a good idea. However, this would be an API change, so it will probably have to be delayed to 7.x.

------------

In a related issue, I have problems differentiating between "order" and "sort" every time I use this API. Intuitively, I think that you "sort" by the name in descending "order", but in fact "order" contains the field name and "sort" the direction. Since we're already in 7.x territory, perhaps the parameters could be renamed into something more clear - like "order_by" instead of "order", and possibly "d" for direction instead of "sort".

gurubert’s picture

Version: 7.x-dev » 6.2

Hi!

This is still open in the 6.2 release. Maybe the API documentation needs a change?

I spent some time walking through the source code to find out why theme ('table', ...) does not work as expected.

Regarding the comments about sort_var and exposing internal database column names:

Is the "field" attribute of the table's $header array used otherwise than being the sort variable for theme_table()?

arthurf’s picture

Status: Active » Needs review
FileSize
587 bytes

According to the api docs for theme_table (for D5 & D6):

$header An array containing the table headers. Each element of the array can be either a localized string or an associative array with the following keys:

* "data": The localized title of the table column.
* "field": The database field represented in the table column (required if user is to be able to sort on this column).
* "sort": A default sort order for this column ("asc" or "desc").
* Any HTML attributes, such as "colspan", to apply to the column header cell.

But if you look at tablesort_header(), we see:

  $cell['data'] = l($cell['data'] . $image, $_GET['q'], array('title' => $title), 'sort='. $ts['sort'] .'&order='. urlencode($cell['data']) . $ts['query_string'], NULL, FALSE, TRUE);

The problem is: urlencode($cell['data']). According to the API docs, that should be: urlencode($cell['field'])- atleast, as far as I can understand it. This seems true for D6 as well.

Supplied patch is for D5.

arthurf’s picture

FileSize
641 bytes

And here's a patch for D6 head. I haven't tried it out, but should be fine.

Damien Tournoud’s picture

Version: 6.2 » 7.x-dev
Category: feature » bug
Status: Needs review » Needs work

I assume the bug is also in Drupal 7.x, so it must be fixed there.

Also:

  • Please learn how to do a proper patch (unified diff): http://drupal.org/patch/create
  • We also need to modify tablesort_get_order() in order for it to understand the new meaning of the "order" argument
  • While we are at it, some cleanup of tablesort.inc will be rather welcome, as the code is really ugly (for example: $ts['sql'] is not SQL, it is expected to be a field name, but tablesort_sql() sanitize it anyway, etc.).
cburschka’s picture

Title: tablesort_header() - order and sort arguments » Drupal 7: Tablesort Cleanup

Yes, indeed. And while we're at it, we could take the opportunity and improve the API in the following ways:

1.) Require an associative key in the $headers array. This key will be used as the URL parameter, which solves the problem by neither introducing localized text into the URL nor exposing the database schema.

2.) Make order determine only the default direction for that field (for example desc for numbers), instead of marking that column as the default sorted field. Instead, the #sort property in the headers array will contain the key of the field sorted by by default.

Does this sound good?

Damien Tournoud’s picture

@Arancaytar: I agree completely.

cburschka’s picture

Category: bug » task
Status: Needs work » Active
sun’s picture

Issue tags: +API clean-up

Please do now. :)

sun’s picture

Status: Active » Needs review
FileSize
7.86 KB

First pass.

Status: Needs review » Needs work

The last submitted patch failed testing.

sun’s picture

Status: Needs work » Needs review
FileSize
18.96 KB

And this time including all changes.

oh boy, someone should have told me how horrible Forum module really is...

Status: Needs review » Needs work

The last submitted patch failed testing.

sun’s picture

Status: Needs work » Needs review
FileSize
21.37 KB

This one will pass.

Anyone up for reviewing and RTBC'ing?

c960657’s picture

Status: Needs review » Needs work

I don't have much experience with the tablesort API, so I'd like somebody else to sign off on this, but here are some comments.

+    if (!empty($ts['field'])) {
+      // Remove table prefix from sorting field.
       // Based on code from db_escape_table(), but this can also contain a dot.
-      $field = preg_replace('/[^A-Za-z0-9_.]+/', '', $ts['sql']);
+      $field = preg_replace('/[^A-Za-z0-9_.]+/', '', $ts['field']);

I don't understand the added comment. AFAICT table prefixes are not stripped.

+    if (!is_array($column) || !isset($column['field'])) {
+      continue;
+    }
+    // Use the header column matching the URL parameter.
+    if ($order == $column['field']) {
+      return array('name' => $column['data'], 'field' => $column['field']);
+    }
+    // In case no header column will match the URL parameter, and this column
+    // defines 'sort', it is supposed to be the default sorting column.
+    if (isset($column['sort']) && ($column['sort'] == 'asc' || $column['sort'] == 'desc')) {
+      $default_column = array('name' => $column['data'], 'field' => $column['field']);
+    }

Doesn't this overwrite $default_column in each iteration, so it ends up referring to the last column with a valid sort attribute? If yes, is this intended? The first column would be a better default.

Do we need to check for isset($column['data']) as well?

+  // If we end up here, then a table header did not define any valid tablesort
+  // data.
+  throw new Exception(t('Invalid TableSort data; header needs to define at least one sorting field.'));
+  return array('name' => '', 'field' => '');

The return is never reached. Though I personally like that Drupal complains loudly in case it detects a developer mistake, it seems that the current convention is not silently ignore cases like these.

+        $ts = tablesort_init($header);

It's a terrible variable name (I know you didn't introduce it).

-  foreach ($headers as $header) {
...
+  foreach ($header as $column) {

I think the variable name $column describes the variable better than $header, but if you change it, I think you should change $headers to $columns. AFAICT $headers is an array of $header variables, so a simple plural form seems like the obvious choice.

Some other clean-up ideas (possibly outside the scope of this issue):
How about renaming tablesort_init() to e.g. tablesort_get_parameters() - the function simply returns stuff and does not initialize anything. Likewise for TableSort::init().

How about killing tablesort_get_sort(), tablesort_get_order() as separate functions and instead just move them inside tablesort_init()? It seems that you rarely need these values alone without the rest of the array returned by tablesort_init(). Likewise for their counterpart methods in TableSort, getSort()/order()/init().

tablesort_header() and tablesort_cell() take an array as argument (by value), modifies it and returns it. It seems more in line with Drupal standards to accept the argument by reference and just modify the original array, i.e. change tablesort_foo($array) to tablesort_foo(&$array).

sun’s picture

Status: Needs work » Needs review
FileSize
21.36 KB

I don't understand the added comment. AFAICT table prefixes are not stripped.

That was contained before already. I'm not sure whether it will work without that, but let's see. :)

Doesn't this overwrite $default_column in each iteration, so it ends up referring to the last column with a valid sort attribute? If yes, is this intended? The first column would be a better default.

Do we need to check for isset($column['data']) as well?

1) No. As the comment explains, and as explained elsewhere in API docs, only the default sorting column in the table's $header should define 'sort'. All other columns do not specify a sort.

2) Since we explicitly check that the column in $header is an array, 'data' must be set. @see theme_table()

The return is never reached. Though I personally like that Drupal complains loudly in case it detects a developer mistake, it seems that the current convention is not silently ignore cases like these.

I agree on both, and with the new exceptions, we should start to think about DX. Removed the return.

I think the variable name $column describes the variable better than $header, but if you change it, I think you should change $headers to $columns. AFAICT $headers is an array of $header variables, so a simple plural form seems like the obvious choice.

Nope, $header is documented in theme_table() and follows the structure documented in there. It is the same $header, so we keep that variable name.

The other clean-ups you mentioned we should defer to another issue. This patch is large enough. :)

c960657’s picture

Status: Needs review » Needs work

I don't understand the added comment. AFAICT table prefixes are not stripped.

That was contained before already. I'm not sure whether it will work without that, but let's see. :)

I was only referring to the additional comment you added (// Remove table prefix from sorting field.), not the code itself. Now that you removed the preg_replace() call, it seems that the user-provided string ends up unescaped in the SQL query.

2) Since we explicitly check that the column in $header is an array, 'data' must be set. @see theme_table()

I'm not sure I follow you. The documentation for theme_table() says this about $header:

 * @param $header
 *   An array containing the table headers. Each element of the array can be
 *   either a localized string or an associative array with the following keys:
 *   - "data": The localized title of the table column.
 *   - "field": The database field represented in the table column (required if
 *     user is to be able to sort on this column).
 *   - "sort": A default sort order for this column ("asc" or "desc").
 *   - Any HTML attributes, such as "colspan", to apply to the column header cell.

I'm not sure whether this means that all the mentioned keys are required when passing an array. It doesn't say so very explicitly. At least the code seems to check for "field" and "sort" using isset(), but not for "data".

Nope, $header is documented in theme_table() and follows the structure documented in there. It is the same $header, so we keep that variable name.

I still think it's a bad name and I think we should change theme_table() :-) But fair enough, we can deal with that later. It's just an internal variable name, so we can change it without breaking any APIs.

sun’s picture

Status: Needs work » Needs review

This patch was at 99% and only hold off by nitpicks. :(

Two other issues made me revisit this issue:

#615822: Benchmarking / profiling of D7
#602522: Links in renderable arrays and forms (e.g. "Operations") are not alterable

Due to the latter patch, I suspect that this patch will no longer apply, but let's see what the bot thinks.

Status: Needs review » Needs work

The last submitted patch failed testing.

effulgentsia’s picture

subscribing

carlos8f’s picture

subscribing

Anonymous’s picture

FileSize
19.23 KB

This is definitely not done. This is simply an attempt to reroll the previous patch since alot has changed in the last month and a half. I'd work some more on it now, but I have to step away for a bit.

Anonymous’s picture

Anyone that wants to play with it, feel free. I won't be able to for a while.

coltrane’s picture

For reference #664042: TableSort order error when no sort set in header affects this issue if it gets in this patch may have to be rerolled.

effulgentsia’s picture

Status: Needs work » Needs review

CNR for bot run of #25. Is this still on the table for D7?

Status: Needs review » Needs work

The last submitted patch, 97293.patch, failed testing.

sun’s picture

Component: theme system » base system
Assigned: Unassigned » sun
Status: Needs work » Needs review
FileSize
21.06 KB

Re-rolled against HEAD. My main interest is to get includes/tablesort.inc out of the regular full bootstrap request path. It's needlessly loaded, on each and every single page.

Status: Needs review » Needs work
Issue tags: -API clean-up

The last submitted patch, drupal.tablesort.30.patch, failed testing.

bojanz’s picture

Status: Needs work » Needs review

#30: drupal.tablesort.30.patch queued for re-testing.

Not sure why the locale test is failing... Let's ask the bot one more time.

Huge +1 for this. I've been looking at the tablesort code while implementing #885014: Add pager and tablesort to EntityFieldQuery, and noticed the problems described...
Reviewed the patch, looks excellent.

Status: Needs review » Needs work

The last submitted patch, drupal.tablesort.30.patch, failed testing.

sun’s picture

Status: Needs work » Needs review

#30: drupal.tablesort.30.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +API clean-up

The last submitted patch, drupal.tablesort.30.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
bojanz’s picture

Status: Needs review » Reviewed & tested by the community

Gave this another review, the fixes are awesome and really needed.
I don't like the fact that we need to require_once tablesort every time we plan on using it, but I guess that's unavoidable (on the other hand, including it on every page even when not used is completely stupid)

sun’s picture

+++ modules/forum/forum.module	25 Sep 2010 14:33:52 -0000
@@ -1058,20 +1044,20 @@ function template_preprocess_forum_list(
+  // Render the table header; this is required, because the forum topic list
+  // table does not use theme_table().
+  require_once DRUPAL_ROOT . '/includes/tablesort.inc';

Note that it's only Forum module that needs to load tablesort.inc manually. As the comment tries to explain, Forum module does not use theme_table(), and on top of that, it tries to output a sortable table also for a forum container, even when there are no topics (since otherwise forum_get_topics() would have been invoked, in which the select query is extended with TableSort, which in turn autoloads tablesort.inc), and therefore Forum module has to load tablesort.inc manually.

That's a total edge-case, and should be fixed in a completely different way: Update Forum module to make sense.

Powered by Dreditor.

bojanz’s picture

Thanks for the clarification. Let's get this in!

sun’s picture

#30: drupal.tablesort.30.patch queued for re-testing.

sun’s picture

Status: Reviewed & tested by the community » Closed (won't fix)
Dave Reid’s picture

Assigned: sun » Unassigned
Status: Closed (won't fix) » Reviewed & tested by the community

Just because someone is upset doesn't mean we have to mark something as won't fix. Someone else is more than welcome to pick up work on a ticket.

sun’s picture

Version: 7.x-dev » 8.x-dev

Although badly needed, this sounds like D8 material to me.

bojanz’s picture

Version: 8.x-dev » 7.x-dev

Can we ask Drieschick first?
If there are parts that are D8, maybe they can be postponed, and the other chunks can get in.
It's a good cleanup and a simple fix to an annoying bug. I actually see nothing controversial about it.

I'm prepared to push this forward (even if it gets moved to D8 in the end).

bojanz’s picture

Version: 7.x-dev » 8.x-dev

And... This is definitely off the table :/

miro_dietiker’s picture

Referencing back to a case addressing 7.x minimal bugfixing for tablesort functions.
#295430: Default sort using tablesort_get_order() is broken.

catch’s picture

Issue tags: -API clean-up

#30: drupal.tablesort.30.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work
Issue tags: +API clean-up

The last submitted patch, drupal.tablesort.30.patch, failed testing.

sun’s picture

Title: Drupal 7: Tablesort Cleanup » Tablesort cleanup
Issue tags: +Framework Initiative
jhedstrom’s picture

FileSize
18.15 KB

Here's a re-roll of #30 that applies cleanly, but now has failing unit tests that need to be updated to work with the cleaned up API.

Tengu’s picture

Subscribing

It's really annoying.

aaronaverill’s picture

The patch from comment #50 touches a lot of files. Attached is a tighter D7.9 fix isolated to tablesort.inc and entity.inc.

Changelog:

Use field to determine sort order: Rewrite tablesort.inc:tablesort_get_order()

  • Compare header[field] to _GET[order] (instead of data)
  • Remove ts[name] - not needed
  • Rename ts[sql] to ts[field] - more internally consistent and not exposed to callers

Decorate column header with sort indicator and URL based on field: Rewrite tablesort.inc:tablesort_header()

  • Compare cell[field] to ts[field] (instead of data)
  • Use ts[field] instead of ts[data] to construct column click sort query params

Decorate cell based on column field: Rewrite tablesort.inc:tablesort_cell()

  • Compare header[field] to ts[field] (instead of data)

Determine sort direction based on field: Rewrite tablesort.inc:tablesort_get_sort()

  • Use header[field] and ts[field (instead of data)

Query database using field: Rewrite TableSort::orderByHeader()

  • Use ts[field] instead of ts[sql]

Fix callers
entity.inc: EntityFieldQuery::tableSort()

  • Rename $order to $ts for code consistency
  • Compare header[field] to ts[field]

Please be gentle this is my first patch and I've only been coding in anger w/ Drupal for about 3 weeks.

aaronaverill’s picture

FileSize
4.52 KB

The are a few issues I needed to handle in addition to using [field] in the sort URL:

  1. Decouple the field ID and database query column
  2. Allow sort order to be reversed (ORDER BY ASC appears with decending indicator)

I've added support for this with the attached D7.9 patch using two new header column attributes: query_field and query_reverse.

As an example of #1, consider the scenario where a item date is stored in a database datetime column, however you would like to show the date and time in two separate table columns. You might use the following $header definition

$header = array(
  array('data' =>'Date','field' => 'date', 'query_field' => 'post_datetime'),
  array('data' =>'Time','field' => 'time', 'query_field' => 'post_datetime'),
);

For these two columns, the URL will be ?order=date and ?order=time, however on the backend TableSort extension is adding an ORDER BY post_datetime clause to the SQL query.

#2 should be self explanatory, just add 'query_reverse' => TRUE

See attached patch.

NROTC_Webmaster’s picture

Status: Needs work » Needs review
FileSize
4.63 KB

Re-roll.

NROTC_Webmaster’s picture

FileSize
4.63 KB

Fix whitespace.

Status: Needs review » Needs work

The last submitted patch, tablesortadd-97293-55.patch, failed testing.

moshe weitzman’s picture

Anyone care to revive this for D8? Still worthwhile.

jibran’s picture

Status: Needs work » Needs review
FileSize
4.97 KB

reroll

Status: Needs review » Needs work

The last submitted patch, 97293-58.patch, failed testing.

jibran’s picture

Status: Needs work » Needs review
FileSize
8.01 KB
12.3 KB

Fixed some tests and docs.

fuzzy76’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

Why can't the indexes in $header be used for identifying the columns? That way, we can actually allow sorting on expressions like "CAST(fieldwronglyimplementedastext AS UNSIGNED)", "fielda + fieldb" and other cool stuff.

User submitted field names is a potential security risk since it can expose the order for fields that aren't supposed to be in the query.

andypost’s picture

jibran’s picture

#60: 97293-60.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Framework Initiative, +API clean-up

The last submitted patch, 97293-60.patch, failed testing.

joelpittet’s picture

Issue tags: +Needs reroll
fuzzy76’s picture

As I've said before, that patch (and the current behaviour) is a potential security risk.

Example from my elearning experience:

A list of students that shows who has turned in an assignment. If a student figures out the column name for the grades (for example by figuring out which module I use), he/she can manipulate the url to sort by grade!

Never mind, I was mistaken.

danylevskyi’s picture

Assigned: Unassigned » danylevskyi
danylevskyi’s picture

Assigned: danylevskyi » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
10.08 KB
danylevskyi’s picture

Issue tags: +Needs reroll
FileSize
10.08 KB

Status: Needs review » Needs work
Issue tags: -Framework Initiative, -API clean-up, -Needs reroll

The last submitted patch, 97293-68.patch, failed testing.

andypost’s picture

moshe weitzman’s picture

grisendo’s picture

Re-rolled

Status: Needs review » Needs work

The last submitted patch, 73: 97293-73.patch, failed testing.

miro_dietiker’s picture

I wonder if we should have a service that defines how to mangle URLs / queries for sorting (and paging also?)

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

voleger’s picture

Version: 8.6.x-dev » 8.7.x-dev
Status: Needs work » Needs review
FileSize
8.87 KB

Rerroll

Status: Needs review » Needs work

The last submitted patch, 82: 97293-82.patch, failed testing. View results

voleger’s picture

Status: Needs work » Needs review
FileSize
410 bytes
8.79 KB
andypost’s picture

Issue tags: +Needs change record

This is serious BC break but it makes sense

Status: Needs review » Needs work

The last submitted patch, 84: 97293-84.patch, failed testing. View results

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

rgpublic’s picture

Just stumbled on this again. I think it's really weird that Drupal introduces the field content into the URL - especially with localization. It can contain weird Chinese letters etc. and in your code you have to check for all those manually. This makes the Drupal sortable table render element far less useful. I was even more surprised to find out that you cannot even override the string that is actually used for the query manually. The code seems to be now in core/lib/Drupal/Core/Utility/TableSort.php. Link::createFromRoute has 'order' => $cell_content which causes the problem.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.