Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Archive
SilverStripe Forums » Archive » version 2.3.0 rc1 - VirtualPage website error
Our old forums are still available as a read-only archive.
|
Page:
1
|
Go to End | |
| Author | Topic: version 2.3.0 rc1 - VirtualPage website error | 1245 Views |
-
version 2.3.0 rc1 - VirtualPage website error

27 November 2008 at 5:22am Last edited: 27 November 2008 5:26am
Navigating to a virtual page on the website I get the following error:
[Notice] Trying to get property of non-object
GET /about-us-v/?stage=Stage
Line 151 in xxx/www/sapphire/core/model/VirtualPage.phpPossible solution:
In core/model/VirtualPage.php - method init():if($this->record->ID){ ...
$this->record is as far as I see not a property of class VirtualPage. Possible replacement (I'm not sure, but this seems to do the job):
if($this->dataRecord->ID){ ...
Also in the init() method:
$this->VersionID = $this->failover->CopyContentFrom()->VersionID;
It looks like VersionID is not part of the properties returned by $this->failover->CopyContentFrom(). Possible replacement (seems to be working as well):
$this->VersionID = $this->failover->CopyContentFrom()->Version;
(question: it looks like $this->failover in this case refers to $this->dataRecord as well. Or am I mistaken - still trying to figure out the stucture of the code here)
-
Re: version 2.3.0 rc1 - VirtualPage website error

16 December 2008 at 5:37am
I get the same error in 2.3.0 rc2:
[Notice] Trying to get property of non-object
GET /forschung-31/
Line 150 in /srv/www/ss_sec/silverstripe-v2.3.0-rc2/sapphire/core/model/VirtualPage.php
Source
141 }
142
143 /**
144 * When the virtualpage is loaded, check to see if the versions are the same
145 * if not, reload the content.
146 * NOTE: Virtual page must have a container object of subclass of sitetree.
147 * We can't load the content without an ID or record to copy it from.
148 */
149 function init(){
150 if($this->record->ID){
151 if($this->record->VersionID != $this->failover->CopyContentFrom()->Version){
152 $this->reloadContent();
153 $this->VersionID = $this->failover->CopyContentFrom()->VersionID;
154 }
155 }
156 parent::init();Trace
VirtualPage_Controller->init()
Line 113 of Controller.php
Controller->handleRequest(HTTPRequest)
Line 19 of ModelAsController.php
ModelAsController->handleRequest(HTTPRequest)
Line 257 of Director.php
Director::handleRequest(HTTPRequest,Session)
Line 106 of Director.php
Director::direct(forschung-31/)
Line 111 of main.php
| 1245 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: zueri, swaiba, Euphemismus, dendeffe
Welcome to our latest member: GreenWork

