appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Bug]: Generating Page with Data by connecting to a new datasource, from an existing page causes an error.

Open btsgh opened this issue 2 years ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

When I try to generate page with data, by connecting to a new datasource, and choose say a sample datasource like movies or users (mongo/postgres), on selecting a table and clicking on Generate Page - an error pops up as below.

Screenshot 2022-11-16 at 5 12 29 PM

Steps To Reproduce

  1. Open an existing application
  2. Go to an existing page within the application
  3. Click on the + sign next to Pages, and choose Generate Page With Data
  4. Choose connect new data source in the Select Data source dropdown
  5. Select users or movies from sample database
  6. Choose an appropriate table
  7. Click on Generate page
  8. An error pops up - Unable to Process Page Generation request

Public Sample App

No response

Issue video log

https://ddpa7mfuvv.vmaker.com/record/GFvgdyG8L82pztda

Version

Production

btsgh avatar Nov 16 '22 12:11 btsgh

@kocharrahul7 @akash-codemonk this seems like a bug in the new flow we introduced. How did this get missed in testing?

Nikhil-Nandagopal avatar Nov 24 '22 05:11 Nikhil-Nandagopal

@kocharrahul7 @ginilpg @Nikhil-Nandagopal The Generate Page With Data implementation right now, is adding the data and widgets to the currently selected page, not to a new page. Hence, when the current page's canvas area is not empty, the error Unable to process page generation request, please use empty layout is displayed, as there is no space on the canvas to add the generated widgets. On the other hand, when a new page with an empty canvas area is used, the Generate Page With Data adds the data and widgets to the same selected page. Is this the intended functionality or the Generate Page With Data should directly create a new page with the data populated widgets?

https://user-images.githubusercontent.com/25542733/206355790-3d21b6ce-6011-4bca-853e-bfe03863341d.mov

NilanshBansal avatar Dec 08 '22 04:12 NilanshBansal

@NilanshBansal this is weird. It should do it on a new page and not the current page.

cc: @kocharrahul7

Nikhil-Nandagopal avatar Dec 08 '22 06:12 Nikhil-Nandagopal

@akash-codemonk Discussed this with @NilanshBansal, this seems to be a front end issue. The solution to this would require calling the new page API, and then passing the new Page ID generate CRUD API.

You can discuss this with @NilanshBansal when you are back in office.

kocharrahul7 avatar Dec 08 '22 07:12 kocharrahul7

This is working fine, able to generate new page by connecting to a new datasource. Verified it on dp url. https://jiju8jbmwa.vmaker.com/record/ezhju4Y8XF04Nc3v image.png

Richarex avatar Jan 04 '23 05:01 Richarex

Test Cases

  1. Verify that user is able to generate page with data, by connecting to a new datasource from an existing page. Expected Result It should generate page with data, from an existing page without any errors and all the tables added should work properly.
  2. Verify that user is to generate page with data by connecting to new datasource from adding new page Expected Result It should generate page with data, from a new page by connecting to new datasource without any errors.

Richarex avatar Jan 09 '23 09:01 Richarex