Trouble implementing lazy loaded feature module Angular 8

So basically I am trying to create a lazy loaded feature module in my application I have been following the official angular docs – but for some reason its not working.

I have set up my feature module DashboardModule as shown below

import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common';  // MODULES import { DashboardRoutingModule } from './dashboard-routing.module';  // COMPONENTS import { DashboardComponent } from './dashboard/dashboard.component'; import { DashboardAlertComponent } from './dashboard-alert/dashboard-alert.component'; import { DashboardSummaryComponent } from './dashboard-summary/dashboard-summary.component'; import { DashboardTasksComponent } from './dashboard-tasks/dashboard-tasks.component'; import { HoldingPageComponent } from './holding-page/holding-page.component';  @NgModule({     imports: [CommonModule, DashboardRoutingModule],     declarations: [         DashboardComponent,         DashboardAlertComponent,         DashboardSummaryComponent,         DashboardTasksComponent,         HoldingPageComponent,     ] }) export class DashboardModule {} 

then in my DashboardRoutingModule

import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router';  import { ActivityComponent } from '../activity-components/activity/activity.component'; import { IsLockedRouteGuard } from '@app/shared/common/auth/is-locked-route-guard'; import { DashboardSummaryComponent } from './dashboard-summary/dashboard-summary.component'; import { SyncComponent } from '@app/popup-components/sync/sync.component'; import { DashboardAlertComponent } from './dashboard-alert/dashboard-alert.component'; import { ChartContainerComponent } from '../chart-components/chart-container/chart-container.component'; import { DashboardTasksComponent } from './dashboard-tasks/dashboard-tasks.component';   @NgModule({     imports: [         RouterModule.forChild([             { path: 'activity', component: ActivityComponent, canActivate: [IsLockedRouteGuard] },             { path: 'snapshot', component: DashboardSummaryComponent },             { path: 'sync', component: SyncComponent },             {                 path: 'alerts',                 component: DashboardAlertComponent,                 canActivate: [IsLockedRouteGuard]             },             { path: 'charts', component: ChartContainerComponent, canActivate: [IsLockedRouteGuard] },             { path: 'tasks/:sort', component: DashboardTasksComponent, canActivate: [IsLockedRouteGuard] },         ])     ],     exports: [RouterModule] }) export class DashboardRoutingModule {}  

so as per the angular docs this has been set up correctly..

now in my AppRoutingModule

import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { AppComponent } from './app.component'; import { AppRouteGuard } from './shared/common/auth/auth-route-guard';  @NgModule({     imports: [         RouterModule.forChild([             {                 path: 'app',                 component: AppComponent,                 children: [                     {                         path: '',                         children: [{ path: '', redirectTo: '/dashboard/alerts', pathMatch: 'full' }]                     },                     {                         path: 'main',                         canActivate: [AppRouteGuard],                         loadChildren: () => import('./main/main.module').then(m => m.MainModule),                         data: { preload: true }                     },                     {                         path: 'dashboard',                         loadChildren: () => import('./main/dashboard/dashboard.module').then(m => m.DashboardModule)                     },                 ]             }         ])     ],     exports: [RouterModule] }) export class AppRoutingModule {} 

but whats happening is when I try and go to /dashboard.. I get this error

Component HoldingPageComponent is not part of any NgModule or the module has not been imported into your module.

but I am clearly importing it in the DashboardModule as shown above.. what am I doing wrong??


Alert pop up when a NewForm is loaded

I would like an alert pop-up to be loaded when a user clicks New Item in a sharepoint list. I want the alert popup to say something like: “You are about to create a New List Item, please verify that you have completed a search of the library before submitting” Ok/Cancel

If the user clicks Ok, the NewForm opens, if the user clicks Cancel, the user returns to the ViewList.

The searches I have done so far only show me how to launch a popup when the user presses Save on a NewForm.

Any help would be appreciated.

1.9.4 thumbnails not loaded correctly from .thumbs dir

… or “breaking already broken features – what is Mage_Core_Model_File_Uploader::getCorrectFileName() for?”

M1 has an bug that thumbnails used in CMS blocks/pages (insert image button) are not created correctly.

To fix this we have used solution from

Worked well for years but now I’ve seen 1.9.4 also broke this!

1.9.4 replaced


$  thumbUrl = $  this->getThumbnailUrl($  item->getFilename(), true); 


$  thumbUrl = $  this->getThumbnailUrl(     Mage_Core_Model_File_Uploader::getCorrectFileName($  item->getFilename()),     true); 

This passes the complete image path to getCorrectFileName() (instead of filename only) and replaces all backslashes with underscores leading to always failed checks in getThumbnailUrl() – so every thumb is generated new every time.

/**  * Correct filename with special chars and spaces  *  * @param string $  fileName  * @return string  */ static public function getCorrectFileName($  fileName) 

This turns var/www/[...]/Some/Image.jpg into _var_www_[...]_Some_Image.jpg

Do you have a better idea then this?

$  thumbImg = Mage_Core_Model_File_Uploader::getCorrectFileName($  item->getBasename()); ... $  thumbUrl = $  this->getThumbnailUrl($  path . DS . $  thumbImg, true); 

PHP Extensions “pdo_mysql” must be loaded

I’m installing Magento 1.x (2014 build), to Apache running PHP 5.6, MYSQL (latest).

I’m receiving the following error when attempting to complete the install PHP Extensions "pdo_mysql" must be loaded.

I’ve added (to the end of files):

to both php.ini files: /etc/php/5.6/apache2/php.ini /etc/php/5.6/cli/php.ini

restart apache with sudo systemctl restart apache2

I’m still receiving the error:

PHP Extensions “pdo_mysql” must be loaded.

This is on the “Configuration” page of the Magento install.

I’ve added (to the end of files):

to both php.ini files: /etc/php/5.6/apache2/php.ini /etc/php/5.6/cli/php.ini

restart apache with sudo systemctl restart apache2

I’m still receiving the error:

PHP Extensions “pdo_mysql” must be loaded.

Google analitycs dissapering after page loaded and wrong data

I’ve got problem with google analitycs in magento2. I turned on google analitycs on my magento2 shop but when i compare results between google adwords and analitycs I’ve got wrong data in analitycs. I’m thinking analitycs should works fine but i’ve taken note that when my page loading script exists and suddenly dissapear. I took a screen with code which dissapear: enter image description here

Can someone help? Had anybody the same problem and fixed this? I’m not sure it’s a problem but i suppose it can be a issue. I hope someone help me.

Cannot use ps2 keyboard during booting and in grub but works fine after os is loaded

A few days ago I installed and updated UBUNTU to it latest version during that period my keyboard worked fine in bios. And now I can’t boot to windows due to keyboard not working in grub. I tried removing CMOS battery but no difference. Also tried usb keyboard but same result. Pls help. AND THANKS IN ADVANCE.

Infopath rule filter cant be applied on a dropdown that has been loaded from external source

I have a form where in a dropdown is loaded from another list. Based on its selection, other fields in the form must be updated(from the external list itself. Same list from where the main drop down was loaded from). But, I’m unable to set a rule where in I can filter according to the dropdown’s selection. I get the error – “Filter cannot be applied to the selected field, Please select some other field”.

Please help me with a way to achieve it.

angular 8 fails going to lazy loaded modules directly after prod deploy

I have downloaded from I ran the app using ng serve with no problem. I can browse url http://localhost:4200 and click on Customers and Orders which both are lazy loading modules. I also can directly browse the url – http://localhost:4200/customers.

Then I built production version using ng build –prod and hosted it on IIS. I can browse the url http://localhost:80 and click on Customers and Orders to navigate to lazy loading modules. No problems!!! However, if I browse directly to the url http://localhost:80/customers, I got HTTP 404 Error. Why??? I need to directly browse to the lazy loading modules. How should I do it?

Thanks in advance!!!

How to apply js and css to ajax loaded content?

When content get loaded through ajax, neither theme.css or js get applied. Below is code snippet,


    $  twig = \Drupal::service('twig');         $  twigFilePath = drupal_get_path('module', 'mythemename') . '/templates/test.html.twig';         $  template =  $  twig->loadTemplate($  twigFilePath);       $  markup = $  template->render(array('gainerList' => $  gainerList, 'loseList' => $  looserList));          $  build = array(             '#type' => 'markup',             '#markup' => $  markup,             '#attached' => array(                 'css' => array(                     drupal_get_path('themes', 'mythemename') . '/css/theme.css'                 )             )         );         return new Response(render($  build)); 

Is there any issue with above code?

Also below testing code does not hide the second


 $  build = array(             '#type' => 'markup',             '#markup' => '<p>Demo text content</p> <p style="display:none">Demo text content</p>',         );         return new Response(render($  build)); 

Js file code snippet:

(function ($  , Drupal) {   'use strict'; = {     attach: function(context, settings) {         $  .ajax({                 url: "get-top-performing-fund",                 type: 'GET',                 success:function(data, error){                     console.log(data);                     $  ('#topPerforming').html();                     $  ('#topPerforming').html(data);                 }         });     } } })(jQuery, Drupal); 

Some images are not loaded – 404 not found

Some images on my Drupal site are not loading. In the folder sites/all/default/files and also in the folder sites/all/themes/mytheme/images some images are not loading.

When I rename the file and upload him again, the image is visible. And also when I copy the site to my localhost all images are showing.

I tried to change my settings.php $ conf['image_allow_insecure_derivatives'] = TRUE; and my .htacces file:

The .htaccess file will look like this:  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006 Options None Options +FollowSymLinks  Change it to: SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006 #Options None #Options +FollowSymLink 

With no luck.

The error: The requested URL "/sites/default/files/images/images1.jpg" was not found on this server.

It’s weird that the images wich are linked to my css file are also blocked.