Title: Random Fatal Error in datamapper
Last modified: August 24, 2016

---

# Random Fatal Error in datamapper

 *  [Logan Yott](https://wordpress.org/support/users/loganyott/)
 * (@loganyott)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-fatal-error-in-datamapper/)
 * Hello,
 * WP v4.2.1
    nextgen-gallery v2.0.79 host: Pantheon
 * I recently switched my site to a WordPress subdirectory installation. I had to
   update from Nextgen-gallery v2.0.4* to v2.0.79, as the older version used a method
   of URL discovery that was incompatible with a subdirectory installation.
 * I now get a
    `Fatal error: Call to a member function get_entity() on a non-object
   in /path/to/wp/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/
   modules/datamapper/package.module.datamapper.php on line 359` seemingly randomly.
   The error appears on the first or second page load, yet subsequent page loads
   appear to not have the problem. If I wait a few minutes and try another page 
   load, the error comes back.
 * I have found that the `$new_entity` referenced in the line is `NULL` when this
   error occurs, hence it not having that member function.
 * I have tried downgrading to earlier versions of WP with no success. I would try
   downgrading ngg, but I’m not sure which version the subdirectory issue was fixed.
 * Any idea on what could be causing this error? Thanks!
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [Logan Yott](https://wordpress.org/support/users/loganyott/)
 * (@loganyott)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-fatal-error-in-datamapper/#post-6096972)
 * I checked out version 2.0.81 from your bitbucket repo (hoping maybe this problem
   would disappear).
 * While the error location changed, it appears to be the same thing happening.
   `
   Fatal error: Call to a member function get_entity() on a non-object in /path/
   to/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/
   datamapper/class.custompost_datamapper_driver.php on line 390`
 * Any ideas would be appreciated! Alternatively, if I should insert a logic check
   here and submit a PR, let me know and I will be happy to do so.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-fatal-error-in-datamapper/#post-6097072)
 * [@logan](https://wordpress.org/support/users/logan/) Yott – A PR would always
   be welcome, we do appreciate contributions from the community … but given this
   is a “migrated” site (and there appears to be a possible caching issue at hand)
   have you tried the Reset Option under Gallery > Other Options and/or clearing
   the image cache under Gallery > Other Options > Miscellaneous?
 * – Cais.
 *  Thread Starter [Logan Yott](https://wordpress.org/support/users/loganyott/)
 * (@loganyott)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-fatal-error-in-datamapper/#post-6097123)
 * Hi Cais,
 * I tried Reset Option and clearing the image cache and I’m still getting the error.
   I haven’t been able to see it locally, so I’m assuming it must be related to 
   Pantheon’s distributed filesystem? I’ll see if I can get a stack trace of the
   issue.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/random-fatal-error-in-datamapper/#post-6097149)
 * [@logan](https://wordpress.org/support/users/logan/) Yott – Ah, Pantheon … we
   just had a recent report on it not working so well with NextGEN Gallery although
   I believe we have made some progress and should have those updates in our next
   release due out soon.
 * – Cais.
 *  Thread Starter [Logan Yott](https://wordpress.org/support/users/loganyott/)
 * (@loganyott)
 * [11 years ago](https://wordpress.org/support/topic/random-fatal-error-in-datamapper/#post-6097276)
 * Is that report in a support thread? Running into a few more issues but I want
   to see if they’ve already been reported/worked on before creating new threads.
 * Thanks!
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years ago](https://wordpress.org/support/topic/random-fatal-error-in-datamapper/#post-6097278)
 * [@logan](https://wordpress.org/support/users/logan/) Yott – There is only a reference
   in our internal notes in this case … as it is, have you updated to the latest
   release of NextGEN Gallery to see if that helps with the issues you are seeing?
 * – Cais.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Random Fatal Error in datamapper’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/random-fatal-error-in-datamapper/#post-6097278)
 * Status: not resolved