Error 10 on get collection
Permalink
Hi!
I have a page not found error when try to access every page of a website.
On concrete/dispatcher.php, line 162 we have a $c->isError(), I test and it returns the number 10. When remove this code, the page self-reload forever:
I clear the cache manually on files/cache.
What is that error? Do someone know to fix it?
Thank you!
I have a page not found error when try to access every page of a website.
On concrete/dispatcher.php, line 162 we have a $c->isError(), I test and it returns the number 10. When remove this code, the page self-reload forever:
if ($c->isError()) { // if we've gotten an error getting information about this particular collection // than we load up the Content class, and get prepared to fire away switch($c->getError()) { case COLLECTION_NOT_FOUND: $v = View::getInstance(); $v->render('/page_not_found'); break; } }
I clear the cache manually on files/cache.
What is that error? Do someone know to fix it?
Thank you!
I'm seeing the same issue. As a result, the script breaks at this point and none of the rest of what's in dispatcher.php executes. Does anyone know the cause / how to fix this? Thanks.
I found the error, but not the solution yet. On concrete/core/libraries/request.php, line 110, we have this:
Godaddy Server does not return PATH_INFO and return REDIRECT_URL with an additional ~/accountname before the Concrete5 path...
If someone know how to fix it, please, tell me! :)
if (defined('SERVER_PATH_VARIABLE')) { $path = Request::parsePathFromRequest(SERVER_PATH_VARIABLE); } if (!$path) { $path = Request::parsePathFromRequest('PATH_INFO'); } if (!$path) { $path = Request::parsePathFromRequest('REDIRECT_URL'); } if (!$path) { $path = Request::parsePathFromRequest('REQUEST_URI'); } if (!$path) { $path = Request::parsePathFromRequest('ORIG_PATH_INFO'); }
Viewing 15 lines of 18 lines. View entire code block.
Godaddy Server does not return PATH_INFO and return REDIRECT_URL with an additional ~/accountname before the Concrete5 path...
If someone know how to fix it, please, tell me! :)
I had a similar problem when trying to access a collection like this:
The problem seemed to be that the attribute related_page was a string, which meant that it getByID() didn't fetch the right object (who knows what object it actually fetched -- probably an error page of some sort).
Anyway, by casting the value given to getByID() as an integer the problem was solved for me:
$page = Page::getByID( $c->getAttribute('related_page') );
The problem seemed to be that the attribute related_page was a string, which meant that it getByID() didn't fetch the right object (who knows what object it actually fetched -- probably an error page of some sort).
Anyway, by casting the value given to getByID() as an integer the problem was solved for me:
$page = Page::getByID( (int)$c->getAttribute('related_page') );
Page Object
(
[blocksAliasedFromMasterCollection:protected] =>
[cID] =>
[attributes:protected] => Array
(
)
[error] => 10
)