Unable to change the set used on a gallery
Permalink Browser Info Environment
We are programmatically adding the Gallery Block to pages with information imported from another site. When the page is created and the editor tries to update the gallery by editing in-page, they receive an error that outputs PHP instead of executing it:
if (!$bID) { $bID = $request->request->get('bID'); } $a = \Area::get($this->page, $arHandle); if (!is_object($a)) { throw new \Exception('Invalid Area'); } $this->area = $a; if (!$a->isGlobalArea()) { $b = \Block::getByID($bID, $this->page, $a); $this->set('isGlobalArea', false); } else { $stack = \Stack::getByName($arHandle); $sc = ConcretePage::getByID($stack->getCollectionID(), 'RECENT'); $b = \Block::getByID($bID, $sc, STACKS_AREA_NAME); $b->setBlockAreaObject($a); // set the original area object $this->set('isGlobalArea', true); } if (!$b) { throw new Exception(t('Access Denied')); } $this->block = $b; $this->permissions = new \Permissions($b); $this->set('bp', $this->permissions); $this->set('b', $b); } public function getViewObject() { if ($this->permissions->canViewEditInterface() && $this->canAccess()) { return \Concrete\Core\Controller\Controller::getViewObject(); } throw new Exception(t('Access Denied')); } protected function getBlockToEdit() { $ax = $this->area; $cx = $this->page; if ($this->area->isGlobalArea()) {
Any chance you assist in diagnosing this?
Thanks,
Brian
if (!$bID) { $bID = $request->request->get('bID'); } $a = \Area::get($this->page, $arHandle); if (!is_object($a)) { throw new \Exception('Invalid Area'); } $this->area = $a; if (!$a->isGlobalArea()) { $b = \Block::getByID($bID, $this->page, $a); $this->set('isGlobalArea', false); } else { $stack = \Stack::getByName($arHandle); $sc = ConcretePage::getByID($stack->getCollectionID(), 'RECENT'); $b = \Block::getByID($bID, $sc, STACKS_AREA_NAME); $b->setBlockAreaObject($a); // set the original area object $this->set('isGlobalArea', true); } if (!$b) { throw new Exception(t('Access Denied')); } $this->block = $b; $this->permissions = new \Permissions($b); $this->set('bp', $this->permissions); $this->set('b', $b); } public function getViewObject() { if ($this->permissions->canViewEditInterface() && $this->canAccess()) { return \Concrete\Core\Controller\Controller::getViewObject(); } throw new Exception(t('Access Denied')); } protected function getBlockToEdit() { $ax = $this->area; $cx = $this->page; if ($this->area->isGlobalArea()) {
Any chance you assist in diagnosing this?
Thanks,
Brian
Type: | Ticket |
---|---|
Status: | Archived |
Bump. Any word here?
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
Still an issue.
On Sat., Dec. 1, 2018, 6:07 p.m. concrete5 Community <
discussions@concretecms.com wrote:
On Sat., Dec. 1, 2018, 6:07 p.m. concrete5 Community <
discussions@concretecms.com wrote:
Hello, I am so sorry for the late response. Is there any way I can get a login (thru PM) to this site, with an example page it is happening? I installed a fresh copy of C5 8.4.1 and currently I am not seeing this issue. It would help me diagnose better if I could see it.
Thank you so much.
Thank you so much.
PM Sent.
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.