appsmith
appsmith copied to clipboard
[Bug]: Generating Page with Data by connecting to a new datasource, from an existing page causes an error.
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.

Steps To Reproduce
- Open an existing application
- Go to an existing page within the application
- Click on the + sign next to Pages, and choose Generate Page With Data
- Choose connect new data source in the Select Data source dropdown
- Select users or movies from sample database
- Choose an appropriate table
- Click on Generate page
- 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
@kocharrahul7 @akash-codemonk this seems like a bug in the new flow we introduced. How did this get missed in testing?
@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 this is weird. It should do it on a new page and not the current page.
cc: @kocharrahul7
@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.
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
Test Cases
- 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.
- 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.