2019-03-14 10:25
浏览 62


I'm developing my module and in localhost I have created tab in back office and when I click on this tab controller works fine , But when I upload this module on my real host module can create tab with no problem but when I click on this tab prestashop will show "Page not found !"

this is my code

        $name="My test name";
    $tab = new Tab();
    foreach (Language::getLanguages(true) as $lang){

and I have created admin/controllers/AdminMyTest.php

class AdminMyTestController extends ModuleAdminController

So , have you any idea whats wrong ? Prestashop version is 1.7.4


图片转代码服务由CSDN问答提供 功能建议

我正在开发我的模块,在localhost中我在后台创建了标签,当我点击这个标签控制器时 工作正常,但是当我在我的真实主机模块上传这个模块时可以创建标签没有问题但是当我点击这个标签时,prestashop会显示“找不到页面!”

这是我的 代码

  $ name =“我的测试名称”; 
 $ tab = new Tab(); 
 $ tab-> id_parent =(int)Tab :: getIdFromClassName  ('AdminParentModulesSf'); 
 $ tab-> name = array(); 
 foreach(Language :: getLanguages(true)as $ lang){
 $ tab-> name [$ lang ['id_lang'  ]] = $ name; 
 $ tab-> class_name ='AdminMyTest'; 
 $ tab-> module = $ this-> name; 
 $ tab-> active = 1; \  n $ tab-> add(); 

我创建了admin / controllers / AdminMyTest.php

 <  code> class AdminMyTestController扩展了ModuleAdminController 

所以,你知道什么是错的吗? Prestashop版本是1.7.4


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douju4278 2019-03-16 16:43

    I have solved this problem ! I think this is Prestashop bug , when we use module class name with lower and upper case for example "MyModule" , when we create a tab , in table ps_tab module field will change to lowercase ! and when we click on tab , prestashop says page not found !

    to fix this problem you should edit module field in ps_tab and change it to real name in according to lower case and upper case for example change it to "MyModule" because now this is "mymodule" or you can change your module name and name it just with lowercase !

    I hope this help you

    点赞 打赏 评论

相关推荐 更多相似问题