cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4.2 Production Mode - Theme view page is blank in admin

Magento 2.4.2 Production Mode - Theme view page is blank in admin

Hi,

  Theme view page is blank while turned on production mode with merge and minify js and css. - https://prnt.sc/25xvq1a

 

Getting error in console:

 

Uncaught TypeError: Cannot read property 'add' of undefined in ui related js in the below line.

 

add("draggable","connectToSortable",{start:function(event,ui){

 

Please check and assist to solve this error.

 

  

1 REPLY 1

Re: Magento 2.4.2 Production Mode - Theme view page is blank in admin

Hello @devishree,

Greetings!

Try to add a click handler, tell it to append the target to the sortable. Then refresh the select.

 $("#sidebar-wrapper").on("click", ".draggable", function(e){
     $(".sortableList").append(e.target).sortable('refresh');
 });

You can also add and remove relevant classes from target if you don't want it to be draggable anymore.

And $.clone instead of $.append if you don't want to move the original. And change the order a bit:

$(e.target).clone().appendTo(".sortableList");

I hope this will help you to solve your issue.

If not, feel free to contact us.

 

If solved, Click KUDOS and accept it as a solution.

Thank you!