How to solve the 404 error in indexing for the blog page due to extension.

The http status of the blog page generates a 404 error when the feature extension is activated to the website.

The error is because the new view for the feature section has been added to all layouts.

 var layout = container.getComponent(‘Layout’);
layout.addChildView(‘Feature.view’, function() {
return new FeatureView({ container: container });
});

Since the view is required only for the PDP page, the view needs to be added only to the PDP page or add the view to the product details full view as childview

var pdp= container.getComponent(‘PDP’);
pdp.addChildView(‘Feature.view’, function() {
return new FeatureView({ container: container });
});

or

.extend(ProductDetailsFullView.prototype, {                         childViews: .extend(ProductDetailsFullView.prototype.childViews, {
                            ‘Feature.view’: function() {    
                                return new FeatureView({    
                                    container: container,  
                                    model: this.model,  
                                    application: this.options.application  
                          });
                      }
            })
         });

Leave a comment

Your email address will not be published. Required fields are marked *