Magento 2.2 – CRUD Operations with UI Component (Add, Update, Delete, Inline Edit)

adminhtmlcrudmagento2magento2.2uicomponent

My Concern is i want to develop basic extension with ui component with simple crud operation so i am referencing cms-page.

What i have achived so far:

  • Grid is properly working(with filter,column view & pagination).

Things don't work for me:

  • When i click on add new page it's give me 500 error.
  • When i edit the page also it's give me 500 error.
  • Inline Editing in grid also give me 500 error after click on save button.

I have also enabled the error_log and put error_reporting(E_ALL) ini_set('display_error','1') into index.php.

Please note that the 500 error log are not stored in system.log or exception.log files or not even in setup:di:compile command.

So let me know any good reference to create basic crud extension with uicomponent or else what is the possiblities of these error.

Best Answer

Looks like you have something issue with your code while click on add new button but its syntax error so its showing 500 internal server error

Now to check what error it is - open your bootstrap.php file from your magento2/app/ directory and then uncomment this line #ini_set('display_errors', 1); by removing # and then check it will print errors on your browser

then you can check what error it is and resolved it for the same .

Regarding your main question yes below i am sharing two links which is most helpful to create CRUD module from sketch.

https://www.pierrefay.com/magento2-training/form-component-backend-crud-admin.html

https://www.ashsmith.io/magento2/module-from-scratch-part-5-adminhtml/