关于SilverStripe Swipestripe:SilverStripe Swipestripe-swipestripe-gallery模块错误

SilverStripe Swipestripe - swipestripe-gallery module error

我已经安装了Swipestripe模块。并添加了swipestripe-gallery产品图片模块。
当我执行dev / bulid?flush = 1时,它显示错误类\\'Gallery_PageExtension \\'不存在
我已经在swipestripe-gallery / _config文件夹中看到gallery.yml文件,该文件具有

1
2
3
Product:
   extensions:
     - 'Gallery_PageExtension'

但该类在swipestripe-gallery / code文件夹中的Product.php文件中不存在。
评论以上代码后,我做了dev / build?flush = 1


您没有使用composer安装吗?您的错;)它为您安装了所有要求,并且您可以编写满意的代码。

请参阅https://github.com/swipestripe/silverstripe-swipestripe-gallery#requirements,您需要安装https://github.com/frankmullenger/silverstripe-gallery才能在代码库中获取此扩展库。

我强烈建议您使用Composer安装所有模块。一开始可能会有些困难,但是在某些日子里,您的生活会更加舒适!很好的介绍可以在ss docs中找到。


Swipestripe的配置没有该代码:https://github.com/swipestripe/silverstripe-swipestripe/blob/2.1/_config/swipestripe.yaml

它的库模块可以做到:https://github.com/swipestripe/silverstripe-swipestripe-gallery/blob/1.1/_config/gallery.yml

这是两个单独的模块。如果像您所说的那样,图库文件位于swipestripe / _config中,那么在我看来,安装并没有按预期进行。

安装根目录中应该有两个文件夹

  • 滑动条/
  • swipestripe-gallery /

与每个模块有关的所有文件应位于每个(单独的)文件夹中。似乎您完全丢失了swipestripe-gallery文件夹,这意味着该类实际上不存在(出现此错误时,只需检查该类是否存在于您的安装中即可。使用grep是最简单的方法)。铅>