magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Gallery jason parse error after extends

Open shinethazhava opened this issue 10 years ago • 7 comments

When i extend Magento/Catalog/Block/product/view/gallery to my custom module then i getting jason parse error with out override any methods .

shinethazhava avatar Mar 12 '16 10:03 shinethazhava

Hi @shinethazhava, thank you for your request!

Could you please provide the source code of class that extends "Magento/Catalog/Block/Product/View/Gallery"?

voleye avatar Mar 14 '16 10:03 voleye

Thanks for the update. I just extend gallery class to my custom class i didn't override any methods. first i get template not found error when i copy gallery.phtml to my custom module then error disappear. but got new jason parse error no console. <preference for="Magento\Catalog\Block\Product\View\Gallery" type="Egits\ProductGallery\Block\Product\View\Gallery" />

When i call parent constructor in extend class going to not found error page

`<?php

namespace Egits\ProductGallery\Block\Product\View;

class Gallery extends \Magento\Catalog\Block\Product\View\Gallery {

}`

shinethazhava avatar Mar 24 '16 09:03 shinethazhava

Hi, @shinethazhava

I have tried to implement something similar to identify the problem but can not reproduce the issue. I have created a patch, could you please review and clarify additional conditions I missed? Or may be this patch will solve your issue.

Egits.zip

voleye avatar Mar 25 '16 13:03 voleye

Hi, @voleye Thanks for the quick response. Will let you know any issue occur.

shinethazhava avatar Mar 26 '16 10:03 shinethazhava

Hi @voleye When i try your patch file also getting the same error.

shinethazhava avatar Apr 07 '16 05:04 shinethazhava

@shinethazhava please provide more detailed steps to reproduce. Please see if you still have this issues in 2.1rc.

piotrekkaminski avatar Jun 14 '16 10:06 piotrekkaminski

According to contributor guide, tickets without response for two weeks should be closed. Please feel free to reopen if it's needed.

palamar avatar Jul 07 '16 15:07 palamar