Sulu 海量搜索包异常 [英] Sulu Massive Search Bundle exception

查看:44
本文介绍了Sulu 海量搜索包异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调用 bash 之后

after calling in bash

bin/adminconsole -vvv massive:search:reindex && bin/websiteconsole massive:search:reindex

我们很快就会在即将成为生产环境的 sulu 1.6 中遇到以下永久性错误:

we get in our sulu 1.6 soon to be production environment the following permanent error:

provider "doctrine_orm"

-- reindexing "0" instances of "Sulu\Bundle\ContactBundle\Entity\Account"

    0 [>---------------------------] < 1 sec 22.0 MiB

-- reindexing "5" instances of "Sulu\Bundle\ContactBundle\Entity\Contact"

 5/5 [============================] 100% < 1 sec/< 1 sec 26.0 MiB

-- reindexing "15" instances of "Sulu\Bundle\MediaBundle\Entity\FileVersionMeta"

 15/15 [============================] 100% < 1 sec/< 1 sec 26.0 MiB

-- reindexing "0" instances of "Sulu\Bundle\CategoryBundle\Entity\CategoryTranslation"

    0 [>---------------------------] < 1 sec 26.0 MiB

provider "sulu_structure"

-- reindexing "5" instances of "Sulu\Bundle\ContentBundle\Document\HomeDocument"

 0/5 [>---------------------------]   0% < 1 sec/< 1 sec 30.5 MiB[2019-10-07 23:56:19] console.ERROR: Error thrown while running command "-vvv massive:search:reindex". Message: "Call to a member function getLocalization() on null" {"exception":"[object] (Error(code: 0): Call to a member function getLocalization() on null at /app/vendor/sulu/sulu/src/Sulu/Component/Content/Compat/LocalizationFinder.php:40)","command":"-vvv massive:search:reindex","message":"Call to a member function getLocalization() on null"} []
23:56:19 ERROR     [console] Error thrown while running command "-vvv massive:search:reindex". Message: "Call to a member function getLocalization() on null"
[
  "exception" => Error {
    #message: "Call to a member function getLocalization() on null"
    #code: 0
    #file: "./vendor/sulu/sulu/src/Sulu/Component/Content/Compat/LocalizationFinder.php"
    #line: 40
    trace: {
      ./vendor/sulu/sulu/src/Sulu/Component/Content/Compat/LocalizationFinder.php:40 { …}
      ./vendor/sulu/sulu/src/Sulu/Component/Content/Document/Subscriber/FallbackLocalizationSubscriber.php:118 { …}
      ./vendor/sulu/sulu/src/Sulu/Component/Content/Document/Subscriber/FallbackLocalizationSubscriber.php:93 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:214 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44 { …}
      ./vendor/sulu/document-manager/lib/Collection/QueryResultCollection.php:85 { …}
      ./vendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Search/Reindex/StructureProvider.php:105 { …}
      ./vendor/massive/search-bundle/Command/ReindexCommand.php:200 { …}
      ./vendor/massive/search-bundle/Command/ReindexCommand.php:150 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:255 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:981 { …}
      ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:86 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:254 { …}
      ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:74 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:147 { …}
      ./bin/console.php:23 {
        › $application = new Application($kernel);
        › $application->run($input);
        › 
        arguments: {
          $input: Symfony\Component\Console\Input\ArgvInput {#1 …}
        }
      }
      ./bin/adminconsole:7 { …}
    }
  },
  "command" => "-vvv massive:search:reindex",
  "message" => "Call to a member function getLocalization() on null"
]

我确实手动删除了var/indexes,但问题仍然存在.

I did remove already manually var/indexes, but the issue prevails.

我将搜索标签 <tag name="sulu.search.field"/> 添加到 text_linetext_editor 字段.

I have search tags <tag name="sulu.search.field" /> added to text_line, text_editor fields.

有没有人有解决这个问题的经验?

Has anybody experience in resolving this issue?

在本地我通过删除和重新初始化完整的数据库来修复它,但在我们的暂存系统中我不想这样做;)

locally I fixed it by droping and reinizializing the complete database but in our staging system I would rather not like to do it this way ;).

非常感谢!

推荐答案

使用以下命令确保已删除或重命名的空间的空间数据仍然不存在:

Make sure with the following commands that no webspace data of a removed or renamed webspace still exists:

bin/adminconsole doctrine:phpcr:shell 'query "SELECT jcr:uuid FROM [nt:base] AS n WHERE ISCHILDNODE(n, \'/cmf\')"'
bin/websiteconsole doctrine:phpcr:shell 'query "SELECT jcr:uuid FROM [nt:base] AS n WHERE ISCHILDNODE(n, \'/cmf\')"'

如果删除的网站空间还有旧数据,请使用以下命令将其删除:

If there is still old data of a removed webspace use the following commands to remove it:

bin/adminconsole doctrine:phpcr:node:remove /cmf/oldwebspacekey
bin/websiteconsole doctrine:phpcr:node:remove /cmf/oldwebspacekey

建议在运行删除命令之前创建一个备份.

Its recommended to create a backup before running the remove commands.

这篇关于Sulu 海量搜索包异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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