Theming – D8 – Business Theme does not load JS into the font-end node

I really need help because I'm trying to find a solution to a problem I can not find on the internet.

I'm using Bootstrap Business Theme in the latest version of Drupal 8. During various tests, I find that JS scripts are not loaded unless the user is an administrator. But when I log in as a user and go to a node editing page, the js are loaded.

I've tried changing different themes to see if that's the problem, but they always load the js code on each page. Therefore, I can not repeat the problem.

What can I do?

Many thanks!!

Proper Google Analytics on Ajax load more

I have an Ajax on the category page and when loading more, after loading via Ajax and after success function URL changes. On this successful feature, I placed this Google Analytics code to translate the URL into the event.

So that's the right code? I think none of them works.

ga('send', {
  hitType: 'event',
  eventCategory: 'page_views',
  page: 'page/'+page+'/'
});

OR

ga('send', {
            hitType: 'pageview',
            page: ''+'page/'+page,
    });

OR

ga('send', {
  hitType: 'event',
  eventCategory: 'page_views',
  eventAction: 'Page scroll',
  page: ''
});

I also tried static code in the header:



Nothing seems to work.

Does Pagination with Infinite Load Affect Search Engine Optimization?

I've developed a website in React for the frontend. I can see links on the pages NO infinitely indexed on Google. Links to those containing an infinite number of pagination pages have not yet been indexed. It is 3 weeks ago. Do I have to convert the pages to normal page breaks without loading them indefinitely?

Java – Lazy Initialization Exception with 2 entities with the same OnetoMany Lazy Load column in session

I get one Lazy Initialization Exception for a onetomany associated column in idle state. It is not the usual session not found problem or eager and lazy on . Please go through the scenario below

I have a Basic Entity class with me discriminator column specified therein. There are two child entity classes for different discriminator values.

base class

@DiscriminatorColumn("cust_type") 
@Table(name = "CUSTOMER_PROFILE") 
Customer
{

@OneToMany(fetch = FetchType.LAZY, cascade = { CascadeType.ALL }) @JoinColumn(name = "common_id", referencedColumnName = "common_id") 
private Set CommonIdentifier = new HashSet();

}

Child class 1 with discriminator value TYPE 1

@Entity(name="CustomerType1") 
@DiscriminatorValue("TYPE1") 
CustomerType1 extends Customer
{
@ManyToOne(optional = true) @JoinColumn(name = "type2_id") private CustomerType2Entity customerType2; // fetch eager
}

Child class 1 with discriminator value TYPE 2

@Entity(name="CustomerType2") 
@DiscriminatorValue("TYPE2") 
CustomerType2 extends Customer
{


}

Here the CUSTOMER with discriminator Type 1 has a join column type2_id which is actually referenced to the same table but to one Customer with different discriminator value.

Even in the base class, there is one onetomany pillar common_id ,

Now there is a scenario in which the customer Type 1 pictured on Type 2 both have the same common_id which is lazy set. Then I'll get Type1 Customer automatically Type2 will also pick.

Everything works fine if there are different common_id for these 2 customers. But if both have the same common_id, then if I load Type1.CommonIdentifier lazy, I get a lazy initialization exception because there are 2 entities with the same collection with the same ID there hibernate Session,

How can I solve this problem? A redesign is not possible table or do CommonIdentifier Eager as a legacy application.

Ask for advice.

Drupal 8 website would not load for anonymous users. As a result, the allowable memory size of 629145600 bytes is exhausted

We have a Drupal 8.7.6 that works fine when logged in as an administrator. All pages, features work flawlessly and provide good performance.

When I tried to load the site as an anonymous user, it continued to spin and ended up with a broken 504 gateway. The logs show the following error:

2019/08/14 20:39:42 (error) 25423 # 25423: * 15460 FastCGI sent in stderr: "PHP message: Fatal PHP error: Allowed memory size of 629145600 bytes exhausted (trying to allocate 20480 bytes) in / core / lib / Drupal / Core / Entity / ContentEntityBase.php on line 191 "while the response header is read from the upstream

(Bug) 25423 # 25423: * 14852 FastCGI sent in stderr: "PHP message: Fatal PHP error: Maximum execution time of 30 seconds exceeded in /core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php on line 606 "reading the response header from the upstream

All this worked fine until yesterday, before we started migrating users and content from our old Drupal 6 system.

We have a similar setup for our development environment that works perfectly well.

I tried setting the execution time in settings.php to 0 to increase the allowed memory, and so on, but this problem persists. There is a lot of data being migrated and I can not recover it from the new copy we have.

Please recommend possible solutions – Thank you in advance.

To create a semantic / accessible list using the Load More button

Here is a simple example of what I would like to do:

HTML:

  • Item 1
  • Item 2
  • Item 3

JS:

// Pseudo code
button.on('click').then(loadThreeMoreItems());

Logically, it's a bit simple and it would work well with the keyboard. I'm not sure how to make this feature more accessible to screen readers, so I'll be alerted when new items are added to the list.

Does anyone have an option / kickstart how to do that?

I did not find anything in my search. Maybe I'm looking for the wrong keyword.

Thanks a lot!

Chrome on MacOS will not load even after closing if a tab is broken

Every time a tab hangs in a loop, Chrome stops working and no other tabs can be used.

Closing / reopening Chrome does not solve the problem.

Sometimes it does not even open after this breakdown.

The loading of sites is only restarted after a complete restart.

I've seen this behavior on most of my colleagues' MacBooks using Chrome and have never encountered such behavior on Windows.

MacOS: High Sierra 10.13.6

Actions – why required – do not load a filter

The filter itself probably works, but the file_exists() returns false,

Not sure if that answers the question, but one problem I see in your code is:

When you enter the code your-plugin/admin/partials/ggowl_template/ggowl_template_func.php. plugin_dir_path( __FILE__ ) from the ggowl_template_post_function() would your-plugin/admin/partials/ggowl_template/ and not the main plugin file path, so I recommend that you define the main plugin file (its absolute path) in the main plugin file as follows:

And from other PHP files than the main plugin file you would use MY_PLUGIN_PLUGIN_FILE and not __FILE__ when referring to the Main plugin file,

Videos are slow to load if the hard drive can not be replaced

Hello everyone, is that why video streaming slows and slows down when you look at this graph? One of the drives has been replaced and now it is synced again. I am not sure if the videos are loaded slowly for this reason.

(root @ localhost home) # cat / proc / mdstat
Personalities: (raid1) (raid6) (raid5) (raid4)
md125: active raid1 sdd1 (2) sdc1 (1)
4096000 blocked Super 1.2 (2/1) (_U)
resync = DELAYED

md128: active raid6 sdf1 (10) (s) sdb1 (0) sdl1 (9) sdk1 (8) sdj1 (7) sdi1 (6) sdh1 (5) sdg1 (4) sde1 (2) sda1 (1)
62511161344 blocked Super 1.2 Level 6, 512 KB Block, Algorithm 2 (10/9) (UUU_UUUUUU)
(> ………………..) Resync = 1.8% (145655296/7813895168) Finish = 87756.0 Min. Speed ​​= 1456 K / sec
Bitmap: 31/59 pages (124 KB), 65536 KB block

md126: active raid1 sdd2 (2) sdc2 (1)
307904 Blocks Super 1.2 (2/2) (UU)
Bitmap: 0/1 pages (0 KB), 65536 KB Chunk

md127: active raid1 sdd3 (2) sdc3 (1)
112747520 blocked Super 1.2 (2/1) (_U)
(===========> ……..) Recovery = 60.8% (68553344/112747520) End = 10.1 min Speed ​​= 72739 K / s
Bitmap: 1/1 page (4 KB), 65536 KB block

reactjs – The React Router wrapper does not load children

I am having trouble creating my component wrapper. I have my static layout, which looks something like this:

Layout.js

export default function MasterLayout(props) {
 return (
    
      
      
        
{props.children}
); }

Then my component at the highest level looks like this:

export default function App() {
  return (
    
      
        
          
          
        
      
    
  );
}

Within events, a list of EventItems is displayed. When I click on one of the events, I go to the route path events / eventId, which creates Component EvenItem. However, I'm having trouble rendering the EventItem component in MasterLayout.js props.children.

How can I correctly create a wrapper that represents subcomponents of events and also applies the use of history?

Wrapper.js

import LayoutContainer from './layout/MasterLayout'
import React, {Component} from 'react'

export const LayoutWrapper = () => (
    
      
    
  );