Can you elaborate in which context you're working? Page and entity?
$testEntry = $entryRepo->findEntry()->where('entry_id', 'bdkwgnna')->fetch();
$testEntry = $entryRepo->findEntry()->where('entry_id', $params->entry_id)->fetch();
public function actionEntry(ParameterBag $params)
{
$entry = $this->assertEntryExists($params->entry_id);
$entryRepo = $this->getEntryRepo();
$testEntry = $entryRepo->findEntry()->where('entry_id', $params->entry_id)->fetch();
$this->assertCanonicalUrl($this->buildLink('dev-tracker', $params->entry_id));
$viewParams = [
'entry' => $entry,
'testEntry' => $testEntry
];
return $this->view('AH\DevTracker:Entry\View', 'ah_dev_tracker_entry_view', $viewParams);
}
What is your route and what is your url you call? The code itself does not look wrong.
Isentry.bdkwgnna
mapped to entity_id? You could add
'id' => $params->entry_id
to your viewParams and output them in the template to see if the id is wrong.
Have you tried /dev-tracker/entry/bdkwgnna/ ?I'm using /dev-tracker/entry.bdkwgnna
Got em. You have str:<entry_id>, but it's :str<entry_id>
public function actionView(ParameterBag $params)
{
$entry = $this->assertEntryExists($params->id);
$viewParams = [
'entry' => $entry
];
return $this->view('AH\DevTracker:DevTracker\View', 'ah_dev_tracker_view', $viewParams);
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.