質問 > 管理機能 > Whoops, looks like something went wrong.の理由が分からない |
管理機能
スレッド表示 | 古いものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
xaiam |
投稿日時: 2020/6/12 15:01
対応状況: 解決済
|
新米 登録日: 2020/6/10 居住地: 投稿: 10 |
Re: Whoops, looks like something went wrong.の理由が分からない 自己解決しました。composer dumpautoloadコマンドを叩いたら直りました。composerやphpがまだよく分かっていないので理由はまだ分かりませんが...
|
xaiam |
投稿日時: 2020/6/12 13:37
対応状況: 開発中
|
新米 登録日: 2020/6/10 居住地: 投稿: 10 |
Whoops, looks like something went wrong.の理由が分からない ▼テンプレート
[EC-CUBE] ec-cube4.0.1 [レンタルサーバ] [OS] macos catalina 最新 [PHP] php7.2 [データベース] mysql 14.14 [WEBサーバ] symfony 組み込み [ブラウザ] chrome 最新 [導入プラグインの有無] [カスタマイズの有無] controllerをひとつとentityをひとつと自作entityをふたつとテンプレートをひとつ [現象] (1/1) ContextErrorException Warning: include(/Users/x/Projects/ec-cube-test/ec-cube): failed to open stream: Undefined error: 0 in ClassLoader.php line 444 at include() in ClassLoader.php line 444 at Composer\Autoload\includeFile('/Users/x/Projects/ec-cube-test/ec-cube/vendor/composer/../..') in ClassLoader.php line 322 at ClassLoader->loadClass('Customize\\Controller\\Admin\\Customer\\CustomerController') in DebugClassLoader.php line 159 at DebugClassLoader->loadClass('Customize\\Controller\\Admin\\Customer\\CustomerController') at spl_autoload_call('Customize\\Controller\\Admin\\Customer\\CustomerController') at is_subclass_of('Customize\\Controller\\Admin\\Customer\\CustomerController', 'Doctrine\\Common\\EventSubscriber') in AutoConfigurationTagPass.php line 45 at AutoConfigurationTagPass->configureDoctrineEventSubscriberTag(object(Definition)) in AutoConfigurationTagPass.php line 37 at AutoConfigurationTagPass->process(object(ContainerBuilder)) in Compiler.php line 140 at Compiler->compile(object(ContainerBuilder)) in ContainerBuilder.php line 789 at ContainerBuilder->compile() in Kernel.php line 643 at Kernel->initializeContainer() in Kernel.php line 135 at Kernel->boot() in Kernel.php line 88 at Kernel->boot() in Kernel.php line 195 at Kernel->handle(object(Request)) in index.php line 76 ------------------------------------- このようなエラーでadminページにも一般ページにもアクセスできなくなりました。理由の目星もついていません。何かヒントはありますか?必要な情報は載せます。開発環境です。現在Customize/にあるentityは CustomerChannel.php CustomerRank.php CustomerTrait.php です。 それぞれの内容は ```CustomerTrait.php <?php namespace Customize\Entity; use Doctrine\ORM\Mapping as ORM; use Eccube\Annotation\EntityExtension; /** * @EntityExtension("Eccube\Entity\Customer") */ trait CustomerTrait { /** * @ORM\Column(type="string", nullable=true) */ private $maker_name; /** * @var CustomerRank | null * @ORM\ManyToOne(targetEntity="\Customize\Entity\CustomerRank") */ private $customerRank; public function getMaker_name(): ?string { return $this->maker_name; } public function setMaker_name(?string $maker_name): self { $this->maker_name = $maker_name; return $this; } /** * @return CustomerRank | null */ public function getCustomerRank(): ?CustomerRank { return $this->customerRank; } /** * @param mixed $customerRank */ public function setCustomerRank(?CustomerRank $customerRank): self { $this->customerRank = $customerRank; return $this; } } ``` ------- ```CustomerRank.php <?php namespace Customize\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="Customize\Repository\CustomerRankRepository") */ class CustomerRank { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\ManyToOne(targetEntity="Customize\Entity\CustomerChannel", inversedBy="customerRanks") * @ORM\JoinColumn(nullable=false) */ private $customerChannel; public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getCustomerChannel(): ?CustomerChannel { return $this->customerChannel; } public function setCustomerChannel(?CustomerChannel $customerChannel): self { $this->customerChannel = $customerChannel; return $this; } } ``` ------- ```CustomerChannel.php <?php namespace Customize\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="Customize\Repository\CustomerChannelRepository") */ class CustomerChannel { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\OneToMany(targetEntity="Customize\Entity\CustomerRank", mappedBy="customerChannel") */ private $customerRanks; public function __construct() { $this->customerRanks = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection|CustomerRank[] */ public function getCustomerRanks(): Collection { return $this->customerRanks; } public function addCustomerRank(CustomerRank $customerRank): self { if (!$this->customerRanks->contains($customerRank)) { $this->customerRanks[] = $customerRank; $customerRank->setCustomerChannel($this); } return $this; } public function removeCustomerRank(CustomerRank $customerRank): self { if ($this->customerRanks->contains($customerRank)) { $this->customerRanks->removeElement($customerRank); // set the owning side to null (unless already changed) if ($customerRank->getCustomerChannel() === $this) { $customerRank->setCustomerChannel(null); } } return $this; } } ``` |
スレッド表示 | 古いものから | 前のトピック | 次のトピック | トップ |