SilverStripe Swipestripe - swipestripe-gallery module error

£可爱£侵袭症+ 提交于 2019-12-12 03:35:43

问题


I've installed Swipestripe module. and added swipestripe-gallery module for product images. when I did dev/bulid?flush=1 it shows error Class 'Gallery_PageExtension' does not exists I have seen gallery.yml file in swipestripe-gallery/_config folder, which has

Product:
   extensions: 
     - 'Gallery_PageExtension'

but this class is not there in Product.php file in swipestripe-gallery/code folder. After commenting above code I did dev/build?flush=1 & there was no error. But in product page the Gallery tab is not added. Please Help.


回答1:


You didn't install using composer? Your fault ;) It installs all requirements for you and you can code happy.

See https://github.com/swipestripe/silverstripe-swipestripe-gallery#requirements, you'll need to install https://github.com/frankmullenger/silverstripe-gallery for getting this gallery extension in your codebase.

I strongly encourage you to install ALL modules with composer. It may be a bit hard in the beginning, but in some days your life will be much more comfortable! A good introduction can be found in the ss docs.




回答2:


Swipestripe's config does not have that code: https://github.com/swipestripe/silverstripe-swipestripe/blob/2.1/_config/swipestripe.yaml

The gallery module for it does: https://github.com/swipestripe/silverstripe-swipestripe-gallery/blob/1.1/_config/gallery.yml

These are two separate modules. If the gallery file is in swipestripe/_config as you say, then it would seem to me that the install didn't happen as it should.

There should be two folders in your installation root

  • swipestripe/
  • swipestripe-gallery/

All files relating to each module should be in each (individual) folder. It seems you're missing the swipestripe-gallery folder all together, meaning that the class in fact does not exist (When you get this error, just check that the class exists somewhere in your install. Using grep is the easiest way).



来源:https://stackoverflow.com/questions/30908710/silverstripe-swipestripe-swipestripe-gallery-module-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!