0
我已將Wordpress上一個古老版本的Timber插件升級到最新版本。我已經通過了1.x升級指南,並完成了所有路由和不建議使用的功能更改。TImber錯誤:PHP警告:{{item.permalink}}已棄用,請使用{{item.link}}而不是
然而,在日誌文件中,我得到了很多重複的PHP的警告錯誤的任何一個頁面加載:
PHP Warning: {{item.permalink}} is deprecated, use {{item.link}}
instead in /Users/chris/sites/staging/wp-
content/plugins/timber-library/lib/Helper.php on line 210
但只點到木材助手文件。它並不指向我正在使用的實際代碼行。它看起來像木材函數拋出這個錯誤是在'一般'的基礎上做?
有關如何解決此問題的任何想法?
如果這會有所幫助,這裏與上述各錯誤相關的PHP堆棧跟蹤的開頭:
[19-Jul-2017 15:19:12 UTC] PHP Stack trace:
[19-Jul-2017 15:19:12 UTC] PHP 1. {main}()
/Users/chris/sites/staging/index.php:0
[19-Jul-2017 15:19:12 UTC] PHP 2. require()
/Users/chris/sites/staging/index.php:17
[19-Jul-2017 15:19:12 UTC] PHP 3. require_once() .
/Users/chris/sites/staging/wp-blog-header.php:19
[19-Jul-2017 15:19:12 UTC] PHP 4. include() .
/Users/chris/sites/staging/wp-includes/template-
loader.php:74
[19-Jul-2017 15:19:12 UTC] PHP 5. Timber\Timber::render()
/Users/chris/sites/staging/wp-
content/themes/staging/page.php:35
[19-Jul-2017 15:19:12 UTC] PHP 6. Timber\Timber::fetch()
/Users/chris/sites/staging/wp-content/plugins/timber-
library/lib/Timber.php:379
[19-Jul-2017 15:19:12 UTC] PHP 7. Timber\Timber::compile()
/Users/chris/sites/staging/wp-content/plugins/timber-
library/lib/Timber.php:352
非常感謝。該堆棧在步驟#5中引用了page.php,但.twig錯誤是{{nav.permalink}}被埋在幾層中,包括幾層深度,所以沒有引用特定的文件名。 有問題的孩子躺在HTML註釋中的一段代碼中間的一段代碼中。謝謝你的幫助! – Cnote
@Cnote不客氣! – Gchtr