Configuring site: Error

oks.v.ermolaev…
Forums
Hi Guys! Thank you so much for sharing your experience about working with Opigno. I am currently trying to install Opigno package but when I save the configure site settings I get this error: "Fatal error: Call to undefined function field_attach_load() in /home/{my username}/{my website}/includes/entity.inc on line 316" Any ideas why this may happen and how to cure this? P.S. I did some research on Drupal.org but the patches that were suggested by Drupal community were not helpful.
Profile picture for user James Aparicio
James Aparicio

Hi oks,

Hi oks,

Did you try?

https://drupal.org/files/1525176-fix_entity_conditions-D7.patch

Delete the database, create a new one and run the install again.

Best regards

friendarin

Oh - thank you! I tried this

Oh - thank you! I tried this patch but without removing databases. Now will give it a try. Thank you anyway!
oks.v.ermolaev…

New Error :(

After removing the databases and patching a new error appeared :( "Fatal error: Class declarations may not be nested in /home/{username}/{domain}/includes/entity.inc on line 358." It seems that this piece of code in entity.inc of Opigno package is slightly different from that in initial Drupal package. I tried to apply the patch but since I am not there still may be mistakes... May this be a clue? Below is the code after patching:class DrupalDefaultEntityController implements DrupalEntityControllerInterface { // Exclude any entities loaded from cache if they don't match $conditions. // This ensures the same behavior whether loading from memory or database. if ($conditions) { foreach ($entities as $key => $entity) { $entity_values = (array) $entity; } foreach ($conditions as $condition_key => $condition_value) { if (is_array($condition_value)) { if (!isset($entity_values[$condition_key])) { unset($entities[$key]); } elseif (!in_array($entity_values[$condition_key], $condition_value)) { unset($entities[$key]); } } elseif (!isset($entity_values[$condition_key]) || $entity_values[$condition_key] != $condition_value) { unset($entities[$key]); } } } }Many thanks for your help!
Profile picture for user James Aparicio
James Aparicio

Hi oks,

Hi oks,

We do not patch any of drupal core code.

Can you try raising your memory limit and the timout in your php.ini and start again from the beginning (withou the patch)? I suspect that might be the problem.

 

Let me know if it worked,

Best regards

oks.v.ermolaev…

Thank you so much - James!

Thank you so much - James! Hopefully that will work.