I created my first nodes after installing Relation. I can edit a node, but viewing a node brings on the White Screen of Death (WSOD). After editing my index.php file to show errors, any attempts at viewing a node show the following:

Fatal error: Class 'RelationQuery' not found in .../modules/relation/relation.module on line 731

Any ideas? I'm not even sure I can create a relation without viewing a node and using the Relation Entity Collector in the sidebar.

CommentFileSizeAuthor
#5 relation.bad-autoloader-constructor.patch521 bytesphayes

Comments

Pohjolander’s picture

Well, I had some sleep, and returned to the problem, successfully getting rid of the WSOD. I don't know if it was that I specifically gave the administrator permission to interact with my new type of node, or that I disabled the Relation Dummy Field in the Module Administration and was able to enter my first relations (the more likely scenario in my mind), but either way, I can now get started. Many thanks for this module.

rafamd’s picture

Status: Active » Closed (works as designed)

So, shall we close this issue ?

phayes’s picture

Assigned: Unassigned » phayes
Status: Closed (works as designed) » Active

I am getting this error (moved to line 742 ) when deleting a taxonomy term. I'll do a debug backtrace and report back.

rafamd’s picture

make sure to get some sleep also :)

phayes’s picture

Assigned: phayes » Unassigned
Status: Active » Needs review
StatusFileSize
new521 bytes

So the problem ended up being that using the __construct method was causing the PHP autoloader to get confused and not properly include the relation.database.inc file. When using autoloaders we should be using the class-name as the constructor method. The attached patch fixes this.

phayes’s picture

Also,

Note that the above patch only fixes the issue with RelationQuery - this bug may be lurking in other classes the use autoloading and a __construct method

mikran’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Component: Code » API
Status: Needs review » Postponed (maintainer needs more info)

I'm clearing the needs review tickets. Is this still an issue with latest version? I don't think the fix is correct in any case so if the problem still persists can you provide exact steps to reproduce it?

mikran’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)