-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getOwnerPage() fails when SiteTree ClassName is not a table i.e. the Page has no additional data columns than its ancestor #946
Comments
@michalkleiner I forgot to mention that the above results in the elemental areas of the affected pages not to appear on the live version, when the page is in Draft mode. That's the biggest problem we're facing with this. From the example above
Our workaround in the mean time was to create a Placeholder |
@rafaeldsousa What’s the value of the If you’re editing a |
@kinglozzer
|
@rafaeldsousa the commit introducing the check might be a red herring here. |
@michalkleiner it seems like it's just as you've said, the className saved on Worth noting that after I've applied the workaround, I've mentioned above (placeholder db field on the pagetype that didn't have fields and a build task to publish pages) the |
So it sounds like we need to debug why |
The problem relates to We can try changing |
@michalkleiner Yep that's where I thought it would be coming from, I was looking for where
Looks like it still relies on DB table name and the |
{$baseTable}.ClassName
when getting the OwnerPage of an ElementalAreaCustomListPage
(with no$db
fields) that extendsGenericContentPage
. So page records are recorded onGenericContentPage
tableSiteTree
the ClassName of the page is saved asCustomListPage
notGenericContentPage
GenericContentPage
butSiteTree
has the page class name asCustomListPage
The fix assumes that
"\"{$baseTable}\".\"ClassName\" = ?" => $class
matches the class, but this is not the case for classes that don't have additional db columns (e.g. classes using their parent class table as pointed in the above example). In these cases the class recorded on the SiteTree differs from the base data table.The text was updated successfully, but these errors were encountered: