Rendered links ignore query array keys

Created on 22 May 2018, over 6 years ago
Updated 9 August 2023, over 1 year ago

Problem

When attempting to use a link with array parameters that have an integer key, the link processed will be incorrect.

Steps to reproduce

In a fresh installation, add link field to article content type.
Add new article and fill the link field with this example "/exampleview?param[89]=89". Save and view the node.
You will see this link "http://domain/exampleview?param%5B0%5D=89&param%5B1%5D=89".

I'm expecting this link "http://domain/exampleview?param%5B89%5D=89".

Why am I trying to use this link?
It is a link to a view to pre-select a multiple filter (checkboxes).

Proposed resolution

Use mergeDeepArray with preserve_integer_keys to TRUE instead of mergeDeep.

Remaining tasks

See if the test can be moved out of testNoLinkUri()

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Render 

Last updated about 9 hours ago

Created by

🇪🇸Spain jtriguero

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024