Magento 2 Admin – Edit Products – Disable Lazy Loading

I have tried looking to see if this has been asked before, but can’t seem to find any information. Hope fellow developers can point me in the right direction.

Magento 2 has a lot of Knockout.js / Lazy loading. Generally this is a good thing. However the issue I am having is sometimes I have to edit multiple products and I would normally open the products in different browser tabs and expect them to be fully loaded. However in magento 2 you have to be on the page for the content to load as it will keep showing the loading icon until you do.

enter image description here

What I want is not for this to be in the loading state, but actually load the page/content. Appreciate the help. Thanks

Angular js -Routing not loading particular function

I am using Routing to navigate between the two navigation tabs but in one partial , I have different modules like form to add the task and edit form to edit . when i use routing for only form that is used add the new task works fine but in the edit form some functions are not loading . lets say i have function to populate values when click on edit but that function is not working out correctly only when i use routing …if i remove routing code it works fine and prepopulate the data that i want to edit ..

below is the code for reference

js code—->

app.config(function($  routeProvider) { // $  locationProvider.hashPrefix(''); $  routeProvider   .when("/", {     templateUrl : "/TaskScheduleTable.aspx",     controller:"myCtrl" }) .when("/OpenTask", {     templateUrl : "/OpenTask.aspx" })  .otherwise({     redirectTo: "/"   })  });    ***  > <li><a ng-href="#/OpenTask"><i class="fa fa-tasks"></i> Open Tasks > </a> >                   </li> >                   <li><a><i class="fa fa-search"></i> 4-Eyes </a> >                   </li> >                   <li><a><i class="fa fa-check-square-o"></i> Completed Tasks </a> >                   </li> >                   <li><a><i class="fa fa-calendar"></i> Calendar </a> >                   </li> >                   <li><a ng-href="#/"><i class="fa fa-edit"></i> Task Schedule </a> 

Thanks in advance

@font-face Font not loading into mpdf

I’m loading in the Google Railway-Light font for my website, and it works fine, but it doesn’t load into the PDF I’m generating. I’m calling it in my css file

@font-face { font-family: "Raleway-Light"; src: url("../font/Raleway-Light.ttf"); } 

And I’m calling in the css file when I generate the PDF.

      $  pdf = new Pdf([       'mode' => Pdf::MODE_CORE,       'format' => Pdf::FORMAT_LETTER,       'orientation' => Pdf::ORIENT_PORTRAIT,       'destination' => Pdf::DEST_BROWSER,       'content' => $  content,       'cssFile' => '/var/www/html/basic/web/css/sites.css',       'marginRight' => 0,       'marginLeft' => 0,       'marginTop' => 0,       'marginBottom' => 0,       'marginHeader' => 0,       'marginFooter' => 0,        'cssInline' => '',       'options' => [       ],       'methods' => [       ]       ]);         if($  user->role == 0) {         $  pdf->showWaterMark = TRUE;       }       // return the pdf output as per the destination setting       return $  pdf->render(); 

I loaded that font into the mpdf ttf folder as well.

AJAX lazy loading listing for laravel/jquery project

Hello!
With new task description my client wrote

I suppose that is like scrolling on youtube ?
When there is no pagination bar and scrolling down more data rows are retrieved?
It was supposed to be laravel 5.7/jquery 3 project with using of https://datatables.yajrabox.com/ for listings.
But seems this lib has no such functionality.
Are there…

AJAX lazy loading listing for laravel/jquery project

Loading data via Excel to SQL

I am loading data from a excel file to sql, I added comments to the code to further clarify what each lines purpose is.

    private void Events_Click(object sender, RoutedEventArgs e)     {         //open dialog for file select of event file         string filePath = OpenFileDialogParameters.FileDialog("", "", "", 2);         //if file select is not null         if (filePath != null)         {             //catch errors in this block             try             {                 //begin a transaction                 using (var transaction = Context.Database.BeginTransaction())                 {                     //parse file into dataset                     Events_DataSet = ReadExcel.OpenExcel(filePath);                     int Drivecode = 0;                     DBEVENT[] Events = //get all rows in table 0                                         (from x in Events_DataSet.Tables[0].Select()                                          //last row must be drivecode, test to ensure it is not empty string                                          where x.ItemArray[x.ItemArray.Length - 1].ToString() != string.Empty                                          let dc = Drivecode = int.Parse(x.ItemArray[x.ItemArray.Length - 1].ToString())                                          //join Session Drive status on drivecode                                          join sds in Context.SDS on dc.ToString() equals sds.DriveCode into hasSD                                          //ensure there is a drive loaded for this file and that the file hasnt already been processed                                          where hasSD.Count() == 1 & hasSD.First().Events == false                                          //select all items that fit these parameters to a array                                          select new DBEVENT(x)).ToArray();                     //if duplicates found fail with error message                     if (Context.DBEVENTS.Where(x =>  x.קוד_נסיעה == Drivecode).Count() != 0)                     {                          StatusBox.Text += "קובץ אירועי נסיעה כבר נטען למסד הנתונים עבור " + Environment.NewLine + "נסיעה " + Events[0].קוד_נסיעה + Environment.NewLine;                         button2s.Fill = Brushes.IndianRed;                         return;                     }                     else                     {                         //ensure there are events to add                         if (Events.Count() > 0)                         {                             //add each event to the table                             foreach (var Event in Events)                             {                                 Context.DBEVENTS.Add(Event);                             }                             //start inner try catch to handle saving                             try                             {                                 //Save Data                                 Context.SaveChanges();                                 //After Save add Completion to SessionDriveTable                                 var sdcompletion = (from sda in Context.SDS                                                     where Drivecode.ToString() == sda.DriveCode                                                     where sda != null                                                     select sda).First().Events = true;                                 //save completion                                 Context.SaveChanges();                                 //commit                                  transaction.Commit();                                 button2s.Fill = Brushes.LawnGreen;                             }                             catch (Exception ex)                             {                                 //rollback changes                                 transaction.Rollback();                                 //throw this error to the outer exception handler                                 //to ensure the entities are removed from the change tracker                                 throw ex;                             }                         }                         //no events created could be drive doesn't exist or events already added                         else                         {                             button2s.Fill = Brushes.IndianRed;                             DataRow dr = Events_DataSet.Tables[0].Rows[1];                             var DriveCode = dr[dr.ItemArray.Count() - 1].ToString();                             StatusBox.Text += "מספר הנסיעה " + DriveCode + " לא קיים במסד הנתונים." + Environment.NewLine + "אנא השלם פרטי נסיעה טרם טעינת קובץ." + Environment.NewLine;                             return;                         }                     }                 }             }             //main exception handler             //rolls back any tracked changes in entity framework             //unwraps exceptions to the most relevant inner exception              catch (Exception ex)             {                 ExceptionRollback();                 while (ex.InnerException != null)                 {                     ex = ex.InnerException;                 }                 button2s.Fill = Brushes.IndianRed;                 StatusBox.Text += ex.Message + Environment.NewLine;             }         }     } 

Exception roll back simply removes any items added modified deleted using entity framework change tracker.

    public void ExceptionRollback()     {         if (Context.ChangeTracker.HasChanges())         {             foreach (var entry in Context.ChangeTracker.Entries()                 .Where(entry => entry.State == EntityState.Added ||                 entry.State == EntityState.Modified ||                 entry.State == EntityState.Deleted))             {                 entry.State = EntityState.Detached;             }         }     } 

Really looking for ideas on how to abstract the functionality away from the UI code…

Web Api не может конвертнуть объект Entity для формирования которого использовался Eager loading в Json

есть Модель EF введите сюда описание изображения

в репозитории производится Eager loading введите сюда описание изображения

Это все потом передаётся в контроллер через прослойку введите сюда описание изображения Все это возвращает следующий результат:введите сюда описание изображения и когда контроллер пытается его вернуть вылетает ошибка в браузеревведите сюда описание изображения в конфиге указал уже
GlobalConfiguration.Configuration.Formatters.Clear(); GlobalConfiguration.Configuration.Formatters.Add(new JsonMediaTypeFormatter());

Patterns for loading related objects in memory (without an ORM)

I am using ADO.NET to read a bunch of data from the database into in-memory objects.

This is my domain model:

// Question.cs public class Question {     public int ID { get; set; }     public string Title { get; set; }     public string Description { get; set; }     public IEnumerable<Tag> Tags { get; set; } }  // Tag.cs public class Tag  {     public int ID { get; set; }     public string Name { get; set; } } 

On retrieving the list of Questions, I would like to fetch the related tags for each question. I am able to do this as follows:

// QuestionRepository.cs  public IList<Question> FindAll() {     var questions = new List<Question>();      using (SqlConnection conn = DB.GetSqlConnection())     {         using (SqlCommand cmd = conn.CreateCommand())         {             cmd.CommandText = "select * from questions";              SqlDataReader reader = cmd.ExecuteReader();              while (reader.Read())             {                 Question question = new Question();                 // Populate the question object using reader                 question.Load(reader);                  questions.Add(question);             }             reader.Close();         }      }     return questions; }   // Question.cs public void Load(SqlDataReader reader) {     ID = int.Parse(reader["ID"].ToString());     Title = reader["Title"].ToString();     Description = reader["Description"].ToString();      // Use Tag Repository to find all the tags for a particular question     Tags = tagRepository.GetAllTagsForQuestionById(ID);  }      return questions; }  // TagRepository.cs public List<Tag> GetAllTagsForQuestionById(int id) {     List<Tag> tags = new List<Tag> ();     // Build sql query to retrive the tags     // Build the in-memory list of tags      return tags; } 

My question is, are there any best practices/patterns for fetching related objects from the database?

Most of the SO questions I came across for loading related data provide the solution for entity framework. There is no answer for this duplicate question.

Even though my code works, I would like to know other ways to do the same. The closest explanation I came across that’s targeting my particular problem was Martin Fowler’s Lazy Load pattern, which I believe, will result in following implementation:

public class Question {     private TagRepository tagRepo = new TagRepository();     private IList<Tag> tags;      public int ID { get; set; }     public string Title { get; set; }     public string Description { get; set; }     public IEnumerable<Tag> Tags {         get         {             if (tags == null)             {                 tags = tagRepo.GetAllTagsForQuestionById(ID);             }             return tags;         }     }   } 

Are there any other alternatives?

Windows boot manager with UEFI not loading

I had windows 10 preinstalled on my system with boot type UEFI mentioned in my lenovo ideal pad boot options. I dual booted with linux mint tara which worked fine with grub loader showing both the OS entries. Later on i decided to delete linux partition which happened to be the system FAT32 partion on which efi bootloader was installed i suppose . to get rid of grub i deleted the EFI dir from windows . Now i am not able to boot into windows as it is on a boot loop keeps saying System BootOrder not found. reSet to default. Help !