Prestashop无尽纺纱产品保存按钮 [英] Prestashop Endless Spinning Product Save Button

查看:80
本文介绍了Prestashop无尽纺纱产品保存按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Prestashop 1.6.1.1。产品保存按钮加载大约需要45秒。我升级到1.6.1.3,现在完全没有加载。我尝试回滚并升级到1.6.1.4。我删除了Smarty Cache,删除了Chrome的历史记录,Cookie等。我在多台工作的计算机上进行了尝试。我直接用1.6.1.4替换了admin / theme和controller文件夹。

I was running Prestashop 1.6.1.1. The product save buttons would take about 45seconds to load. I upgraded to 1.6.1.3 and they now don't load at all. I tried rolling back and upgraded to 1.6.1.4. I deleted Smarty Cache, Deleted Chrome's history, cookies etc. I tried on multiple computers at work. I replaced admin/theme and controller folders with 1.6.1.4 directly.

当我检查网络请求时,我看到少数选项卡未加载,并出现500个错误,其中一个带有404错误。产品保存按钮将无法完全加载,直到所有标签都已加载。在Firefox中,当我选择重新发送请求时,我得到了202分。

When I inspect the Network requests I see a handful of the tabs are not loading and get 500 errors and one with 404. The product save buttons won't completely load until all the tabs have loaded. In Firefox when I chose to resend the request I get a good 202.

我在工作和在家中都遇到了这种情况。我就此问题联系了Hostgator。他们测试并说保存按钮为他加载了,不太确定我是否相信他。但是,如果这对他如他所说的那样奏效的话,听起来像是cookie /缓存问题。

I'm experiencing this at work and at home. I contacted Hostgator about the issue. They tested and said the save button loaded for him, not quite sure I believe him. But if it worked for him as he said it sounds like a cookie/cache problem.

我缺少什么?

推荐答案

这是很常见的Prestashop 1.6.xx的问题

It is a very common problem of Prestashop 1.6.x.x.

Prestashop具有复杂的产品编辑页面由多个选项卡组成,在这些选项卡中异步加载了信息(使用Ajax)。
保存和保存并保留按钮一直旋转,直到所有标签页加载成功
如果这些选项卡数据之一有任何错误-它会持续旋转很长时间或永远。

Prestashop has a complex product editing page consisting of multiple tabs where information is loaded asynchronously (using Ajax). The "Save" and "Save & stay" buttons keeps spinning until all tabs are loaded successfully. If you have got any error in one of these tabs data - it will keep spinning long or forever.


  1. 尝试使用其他浏览器。为确保它与您的浏览器
    不相关(Java语言是相对于浏览器的),请尝试其他浏览器。

  1. Try another browser. To be sure it is not related with your browser (Javascript is relative to the browser) - try another one.

修复您的浏览器Prestashop 。可能您的Prestashop中有错误。它可能是损坏或过时的模块,数据库中的损坏或无效数据,已修改的核心Prestashop文件等。调试和修复它并不容易。

Fix your Prestashop. Possibly you have an error in your Prestashop. It can be broken or outdated modules, broken or invalid data in the database, modified core Prestashop files etc. It is not easy to debug and fix it.

添加技巧* 注意!如果确定没有其他选择,请执行此操作。通过添加此技巧,您可以在保存新产品时收到一些Javascript警告,但不会造成数据丢失。

Add a trick*. Caution! Do it if you are sure you have no other options. By adding this trick you can get some Javascript warnings while saving a new product but it won't produce data loss.



*添加技巧



您不会编辑核心Prestashop文件,但使用替代。

*Adding a trick

You are not going to edit core Prestashop files, but use overrides.

[yoursiteroot] -是Prestashop网站的根文件夹。可以是 public_html /

[您的管理员] -是Prestashop安装的admin文件夹。它可以是随机字符序列,例如 smbcl5blanwcxnfs / 或其他任何字符。您可以在登录到管理面板的URL行中看到它:
http://www.yoursite.com/ [youradmin] /index.php?...

[youradmin] - is an admin folder of your Prestashop installation. It can be a sequence of random characters like smbcl5blanwcxnfs/ or anything else. You can see it while logged to your admin panel in the URL line: http://www.yoursite.com/[youradmin]/index.php?....


  1. 使用FTP 复制所有.tpl文件

来自 [yoursiteroot] / [youradmin] / themes / default / template / controllers / products

[yoursiteroot] / override / controllers / admin / templates / products

如果此文件夹没有不存在-完全使用其所有路径文件夹创建它。

If this folder doesn't exist - create it exactly with all its path folders.

(可选,您可以复制相同的 index.php 文件从该文件夹到您创建的所有新文件夹。只是出于安全原因。)

(Optionally you can copy the same index.php file from that folder to all new folders you have created. It is just for the security reasons.)

在所有这些新复制的文件的底部找到相同的行:

Find at the bottom of all these freshly copied files the same lines:

<button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save'}</button>
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save and stay'}</button>

更改为

<button type="submit" name="submitAddproduct" class="btn btn-default pull-right"><i class="process-icon-save"></i> {l s='Save'}</button>
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right"><i class="process-icon-save"></i> {l s='Save and stay'}</button>

我们到底对代码做了什么?

What exactly we have done with the code?

已删除 disabled = disabled

已替换 process-icon-loading process-icon-save

请确保在您的网站中后台设置高级参数>性能>禁用所有替代值设置为

Be sure in your site Backoffice settings Advanced parameters > Performance > Disable all overrides is set to No.

禁用所有替代设置为否

完成!

我们希望Prestashop将来能解决此尴尬的错误预防措施。

We hope Prestashop fix this awkward errors precaution in a future.

如果要删除技巧,只需删除所有添加的.tpl文件即可。

If you want to remove the trick - just remove all these added .tpl files.

这篇关于Prestashop无尽纺纱产品保存按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆