appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.04k stars 3.67k forks source link

[Bug]-[20]:The table widget binding fails when the user renames the table widget to data #12934

Open RakshaKShetty opened 2 years ago

RakshaKShetty commented 2 years ago

Is there an existing issue for this?

Description

The table widget binding fails when the user renames the table widget to data

image image

Steps To Reproduce

  1. Run a select query
  2. bind it to table widget
  3. Now rename the table widget to data
  4. The binding fails in the table widget

Public Sample App

No response

Version

release

dilippitchika commented 2 years ago

No data exists to determine the reach directly. We need a way to log widget names in mixpanel. Assuming 10 for now due to the fact that if this was caught then people would have gotten back to us in most cases. Good catch @RakshaKShetty 🎖️

Stats

Stat Values
Reach 10
Effort (months) 0.5
ganganimaulik commented 2 years ago

related issue: when changing back table name to customers, database query also changes from {{getCustomers.data}} to {{getCustomers.customers}}

https://user-images.githubusercontent.com/10296400/165010719-52998af6-2b56-4189-bbdb-45be4bbe7a15.mp4

dilippitchika commented 2 years ago

Hey @ganganimaulik i think this happens because we automatically migrate all the references for any widget based on the widget's name.

ganganimaulik commented 2 years ago

Hey @ganganimaulik i think this happens because we automatically migrate all the references for any widget based on the widget's name.

okay, but it is changing property name instead of object. not sure if this is intended.

ghost commented 2 years ago

This also happens if the table is renamed to result. It seems to be any keyword may cause this issue. See #9189 as well.

dilippitchika commented 2 years ago

@sbalaji1192 is this something we can fix? I believe this also happens in other widgets right?