バージョン選択

フォーラム

メニュー

オンライン状況

55 人のユーザが現在オンラインです。 (46 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 55
もっと...

サイト内検索

質問 > 管理機能 > Whoops, looks like something went wrong.の理由が分からない

管理機能

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
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;
}
}

```
xaiam
投稿日時: 2020/6/12 15:01
対応状況: 解決済
新米
登録日: 2020/6/10
居住地:
投稿: 10
Re: Whoops, looks like something went wrong.の理由が分からない
自己解決しました。composer dumpautoloadコマンドを叩いたら直りました。composerやphpがまだよく分かっていないので理由はまだ分かりませんが...
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,281名です
総投稿数は109,688件です

投稿数ランキング

1
seasoft
7365
2
468
3217
3
AMUAMU
2712
4
nanasess
2303
5
umebius
2085
6
yuh
1818
7
h_tanaka
1610
8
red
1567
9
mcontact
1240
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
796
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.