budibase icon indicating copy to clipboard operation
budibase copied to clipboard

Table Block link table rows / link screen doesn't work

Open Klience opened this issue 2 years ago • 2 comments

Hosting

  • Cloud
    • App version - 1.1.21

Describe the bug Table Block's "link table rows" / "link screen" doesn't work.

  1. When linked to "/inner-page" it always redirects to home page instead, a.k.a. the "/" screen. It's not a problem with access rights, as I'm trying to redirect an "Admin User" from a "Basic User Screen" to a "Public User Screen".

  2. When linked to www.google.com, it redirects to https://tenantID.budibase.app/www.google.com/ro_ta_182baf8810ac47c4... So it inserts that third party link between the tenantID and some internal ID that starts with "ro_ta".

  3. When linked to https://google.com, it redirects to https://google.com/ro_ta_182baf8810ac47c4... So it adds the internal ID to the google query or something.

To Reproduce Steps to reproduce the behavior:

  1. Create a Budibase Internal Table
  2. Create some columns and add dummy data
  3. Configure a Data Provider with Table Block
  4. Check "link table rows" and select one of internal screens or type a third party URL.

Expected behavior Redirect to an /inner-screen or https://website.com/

Screenshots link screen table block 1 link screen table block 5 link screen table block 3 link screen table block 2 link screen table block 4

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 103.0.5060.134 (Official Build) (64-bit)

Additional context I didn't test beyond Admin role and public and basic screens for internal linking.

Klience avatar Jul 22 '22 17:07 Klience

Edit 1: Same functionality is identically broken for "Table" component. So both "Table" and "Table Block" have broken "link table rows / link screen" feature.

Edit 2: I tested the "Title Button" of Table Block that does the same thing. It works as expected. It redirects correctly to "/job-portal" inner screen and https://website.com

Klience avatar Jul 22 '22 17:07 Klience

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Sep 21 '22 04:09 stale[bot]

Hi @Klience,

When linked to "/inner-page" it always redirects to home page instead, a.k.a. the "/" screen. It's not a problem with access rights, as I'm trying to redirect an "Admin User" from a "Basic User Screen" to a "Public User Screen".

Did you have a screen in your application with a path similar to /inner-page/:id? When the row is clicked, the configured link /inner-page is combined with the _id field for the row e.g /inner-page/ro_ta_fad297.... This is the default behaviour, if you wanted to append something other than _id you can specify that in the ID column for linking setting for the table.

Without the /inner-page/:id screen existing, the app will redirect to the home screen. Which is the same behaviour that you are seeing here.

When linked to www.google.com, it redirects to https://tenantid.budibase.app/www.google.com/ro_ta_182baf8810ac47c4... So it inserts that third party link between the tenantID and some internal ID that starts with "ro_ta".

The link value is treated like a string if not supplied with a protocol. It will be treated the same way as your /inner-page link unless prefixed with http:// or https://. With a protocol supplied, the row _id variable will be appended to the supplied link e.g. "https://google.com/ro_ta_fad297...."

When linked to https://google.com/, it redirects to https://google.com/ro_ta_182baf8810ac47c4... So it adds the internal ID to the google query or something.

As outlined above, this is the expected behaviour unless you reconfigure the value being appended.

Hopefully that all makes sense. If you have any further issues, please let me know.

deanhannigan avatar Oct 06 '22 17:10 deanhannigan