You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unsure if this is a Formie issue or a Craft issue, but at some point i found myself unable to edit a specific form. Instead i got the error "Call to a member function getFieldById() on null" in "/var/www/html/vendor/craftcms/cms/src/base/NestedElementTrait.php" at line 305.
After some slight digging i found that the form was apparently being used in an abandoned temporary element and this caused an error in the usage tab of the form settings. I only found this out by commenting out _self.tableColumns, dumping all the element ids, then attempting to find which one was at fault. Eventually i found an inaccessible element that appears to have been abandoned in some way. Should there maybe be a safeguard against something like this?
Steps to reproduce
I can't provide much in the way of reproducing this issue, as i do not know what caused this temporary element to become abandoned. I can say that this element appears to be a matrix block as its associated field layout matched other blocks that we have. I do have a dump of the element, but i don't know if there is much more that i can provide, as most methods for accessing extra information trigger the same error.
Describe the bug
I'm unsure if this is a Formie issue or a Craft issue, but at some point i found myself unable to edit a specific form. Instead i got the error "Call to a member function getFieldById() on null" in "/var/www/html/vendor/craftcms/cms/src/base/NestedElementTrait.php" at line 305.
After some slight digging i found that the form was apparently being used in an abandoned temporary element and this caused an error in the usage tab of the form settings. I only found this out by commenting out _self.tableColumns, dumping all the element ids, then attempting to find which one was at fault. Eventually i found an inaccessible element that appears to have been abandoned in some way. Should there maybe be a safeguard against something like this?
Steps to reproduce
I can't provide much in the way of reproducing this issue, as i do not know what caused this temporary element to become abandoned. I can say that this element appears to be a matrix block as its associated field layout matched other blocks that we have. I do have a dump of the element, but i don't know if there is much more that i can provide, as most methods for accessing extra information trigger the same error.
craft\elements\Entry {#4126 ▼
-_events: []
-_eventWildcards: []
-_behaviors: array:1 [▶]
-_errors: null
-_validators: null
-_scenario: "default"
#revisionCreatorId: null
#revisionNotes: null
-_canonicalId: null
-_canonical: null
-_canonicalAnySite: null
-_canonicalUid: null
-_outdatedAttributes: null
-_modifiedAttributes: null
-_outdatedFields: null
-_modifiedFields: null
-_initialized: true
-_fieldParamNamePrefix: null
-_normalizedFieldValues: null
-_allDirty: false
-_dirtyAttributes: []
-_savedTitle: null
-_dirtyFields: []
-_nextElement: false
-_prevElement: false
-_parentId: null
-_parent: null
-_hasNewParent: null
-_prevSibling: null
-_nextSibling: null
-_invalidNestedElementIds: []
-_eagerLoadedElements: []
-_lazyEagerLoadedElements: []
-_eagerLoadedElementCounts: []
-_currentRevision: null
-_enabledForSite: true
-_uiLabel: null
-_uiLabelPath: []
-_isFresh: null
-_serializeFields: false
+elementQueryResult: array:1 [▶]
+eagerLoadInfo: null
+id: 158
+tempId: null
+draftId: null
+revisionId: null
+isProvisionalDraft: false
+uid: "169a1232-d403-4a31-bb37-dbe696ca5248"
+siteSettingsId: 158
+fieldLayoutId: null
+structureId: null
+enabled: true
+archived: false
+siteId: 1
+title: null
+slug: "__temp_iwembpypdbpoyrrybemlcrhpltwuksblgylc"
+uri: null
+dateCreated: DateTime @1718622932 {#4127 ▶}
+dateUpdated: DateTime @1734425166 {#4128 ▶}
+dateLastMerged: null
+dateDeleted: null
+deletedWithOwner: null
+root: null
+lft: null
+rgt: null
+level: null
+searchScore: null
+trashed: false
+awaitingFieldValues: false
+propagating: false
+propagatingFrom: null
+propagateAll: false
+newSiteIds: []
+isNewForSite: false
+resaving: false
+duplicateOf: null
+firstSave: false
+mergingCanonicalChanges: false
+updatingFromDerivative: false
+previewing: false
+viewMode: null
+forceSave: false
+hardDelete: false
+sectionId: null
+collapsed: false
+postDate: DateTime @1718622900 {#4129 ▶}
+expiryDate: null
+deletedWithEntryType: false
+deletedWithSection: false
-_authorIds: []
-_authors: null
-_typeId: 12
-_oldTypeId: 12
-_type: null
-primaryOwnerId: 2
-ownerId: null
+fieldId: 10
+sortOrder: null
+saveOwnership: true
+updateSearchIndexForOwner: false
}
Form settings
Craft CMS version
5.6.4
Plugin version
3.0.20
Multi-site?
yes
Additional context
No response
The text was updated successfully, but these errors were encountered: