Installation on Aegir with Drush 7 fails with error:

OpenAtrium 2.30-rc3 7.34.1 [001]

Drush command terminated abnormally due to an unrecoverable error.
Error: Class 'views_handler_filter_entityreference_autocomplete' not found in /data/all/001/openatrium-2.30-rc3-7.34.1/profiles/openatrium/modules/contrib/oa_core/plugins/views/oa_core_og_group_ref_views_handler_filter_entityreference_autocomplete.inc, line 8

Comments

mpotter’s picture

Try using this core patch: https://www.drupal.org/files/issues/1311820-drupal-registry_update-13.patch

It's included in the -dev for the next version and helps with some of the autoloading class issues during installation.

Cause the class *does* exist in that file and that file is listed in the oa_core.info file, but I know the autoloader likes the name of the file to match the name of the class. The above patches changes the order in the Drupal installer for when the registry is updated. Would be really interested to know if it helps.

(If you pull the latest git revision of the openatrium project that patch is added to drupal-org-core.make)

hefox’s picture

The missing class is the parent class, and that class is provided via a patch to entity reference. Is that patch applied to the version of entity reference that is running on the site? Need to use modules provided via tarbal or drush make of openatrium's make files to get all necessary core/contrib patches.

omega8cc’s picture

Is the 'entityreference' module patched? I couldn't find any mention of it in the codebase.

It would help if all patched modules could be listed at https://www.drupal.org/node/2419299, but the "Patches applied in this package" section is empty there.

omega8cc’s picture

Ouch, indeed, we have replaced both 'entityreference' and 'entity' modules because we had to do this in the past for older OA versions due to security upgrades, but now both are up to date already, and indeed have the PATCHES.txt inside.

I guess we need to re-test this again.

omega8cc’s picture

Priority: Critical » Normal
Status: Active » Closed (cannot reproduce)

Further testing confirmed that it was entirely our fault, sorry!

The installation works just fine, there is just a flood of warnings, but they are there also for 2.6 version:

https://gist.github.com/omega8cc/aff17370c249eaa854df

svallej’s picture

I didn't found how to patch, i've try the first instruction patching the module.inc and its doesn't work at all, any further help??

here is the error:

Fatal error: Class 'views_handler_filter_entityreference_autocomplete' not found in /Library/WebServer/Documents/maxim/sites/all/modules/oa_core/plugins/views/oa_core_og_group_ref_views_handler_filter_entityreference_autocomplete.inc on line 8

mpotter’s picture

At this point, please just try the released 2.30 version instead of rc3. It has all the patches.

pol’s picture

Status: Closed (cannot reproduce) » Active

Got the same error in Aegir with OpenAtrium 7.x-2.x.

Screenshot: https://drive.google.com/file/d/0B7ugUjBv1lqHWHc1WE45XzlNMEk/view?usp=sh...

randallknutson’s picture

Just ran into this. It has to do with the version of drush that is running the make files. I was running drush 6.3 and panopoly_core would include entityreference 1.1 without patches and override oa_core. When I reverted to drush 5.9 and made it again oa_core won out.

hefox’s picture

yep, gotta use the make files for 6 or drush 5 for openatrium (to my understanding, d.o still uses 5 so constrained by that).

hefox’s picture

Category: Bug report » Support request
Status: Active » Fixed

Re-open (and switch back to bug) if can reproduce this with drush 5/that doesn't help

pol’s picture

Status: Fixed » Active

Hi,

We are using Drush 7.x on our Aegir server so Drupal 8 can be installed.
If we switch to Drush 5.x, we won't be able to install D8 anymore.

Is there another workaround to this problem ?

mpotter’s picture

Status: Active » Fixed

There are make files for Drush 6 in the /scripts directory that will probably work with Drush 7. But you'll need to mess with that yourself. We cannot change the default scripts because Drupal.org uses Drush 5 for packaging distros so we are stuck with that until d.o updates drush.

pol’s picture

Ok. I will let you know my findings, if any.

pol’s picture

Status: Fixed » Active
StatusFileSize
new242.88 KB

Sorry to reopen this but it still doesn't work.

@mpotter: The building is working fine with Drush 7.

The problem is when Aegir tries to install a site using the Openatrium profile.

I tried with Drush 5, 6 and 7.

When installing with Drush 5, I have this error, see the attached screenshot.

When installing with Drush 6 and Drush 7, it doesn't complain anymore about the Drush version, but I still got the error:

Error: Class 'views_handler_filter_entityreference_autocomplete' not found in /var/aegir/platforms/platform_openatrium_master_32/profiles/openatrium/modules/contrib/oa_core/plugins/views/oa_core_og_group_ref_views_handler_filter_entityreference_autocomplete.inc, line 8

Any idea to help ?

hefox’s picture

Status: Active » Postponed (maintainer needs more info)

The error means the entityreference project was not patched, are you using the drush make files for drush6 as default ones are for drush5?

pol’s picture

@hefox: here's the full building log: http://pastebin.com/7yZPcBE8

As you can see, Entityreference gets patched correctly.

I'm out of ideas now :(

hefox’s picture

The first time only; it's downloaded (stable version instead of patched) again later on :(

pol’s picture

Status: Postponed (maintainer needs more info) » Fixed

Ok now I got it working.

We absolutely need Drush 5 to build (in Jenkins) the distribution.
You can use Drush 7 in Aegir to install it once the platform is available.

Screenshot: https://drive.google.com/file/d/0B7ugUjBv1lqHRktIbFlTZ2lYeE0/view?usp=sh...

dashohoxha’s picture

StatusFileSize
new3.08 KB

I can confirm that the drush version is the cause of this problem. I am using drush 6 and the attached patch solved the problem for me. I am using it like this:

projects[openatrium][type] = profile
projects[openatrium][download][type] = git
projects[openatrium][download][tag] = 7.x-2.40-rc1
projects[openatrium][patch][makefile] = https://www.drupal.org/files/issues/fix-openatrium-makefile-for-drush-6.patch

See: https://github.com/dashohoxha/dbox/blob/openatrium/build-labdoo.make#L15

pol’s picture

StatusFileSize
new3.51 KB

Here's an attempt for development version.

pol’s picture

With this patch, the build is now ok: http://pastebin.com/L4fUGmP7

pol’s picture

StatusFileSize
new3.55 KB

Another attempt for testing.

dashohoxha’s picture

Maybe the panopoly section should be placed at the top, isn't it?

pol’s picture

I think yes, I'll do a new patch tonight.

mpotter’s picture

The problem with the patches in #20, #21, #23 is that you are missing several Panopoly patches. Just pulling in Panopoly 1.20 or 1.x-dev isn't the same as what the Open Atrium make file is doing with additional patches. Without those additional patches you are going to have problems elsewhere in Open Atrium.

The *REAL* fix to this would be to get Drupal.org to update their Drush from 5.x to 6.x. Drush 5.x is just so old at this point. Maybe I'll talk to people at DrupalCon about this. The last excuse I heard a long time ago was "we can't update Drush until d.o gets converted to Drupal 7". Well, we are at Drupal 7 now, so what's holding back the Drush update now?

mpotter’s picture

Also, @hefox is fixing this for good within OA2 itself in this issue: #2477345: Patch Panopoly instead of overriding in .make files by moving the patches needed for Panopoly from oa_core into Panopoly itself so the make file parsing order won't matter anymore.

dashohoxha’s picture

Thanks @mpotter. I will make another patch soon that keeps the OA patches to Panopoly, as a quick fix for the time being.

dashohoxha’s picture

StatusFileSize
new5.59 KB

This patch hopefully works better.
Also I think that using the development version of Panopoly modules is not a good idea, simply because the OA makefile that we are fixing does not use them.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

cesar.brod@gmail.com’s picture

I just ran out on this very same problem after using the update modules function inside my Open Atrium site. As this thread is from two years ago and I see some of the patches have been included in the entity* modules, I wonder if something has changed again. I am using openatrium-7.x-2.612 and although the error was caught first on /var/log/apache2/error.log, I tried drush 5, 6, 7 and 8 and got the same error reported here. My full error log line is:

[Fri Jan 06 17:19:17.381220 2017] [:error] [pid 4924] [client 177.188.13.99:58286] PHP Fatal error: Class 'views_handler_filter_entityreference_autocomplete' not found in /var/www/mundolinux/profiles/openatrium/modules/contrib/oa_core/plugins/views/oa_core_og_group_ref_views_handler_filter_entityreference_autocomplete.inc on line 8

cesar.brod@gmail.com’s picture

After struggling with this problem for a couple hours, @lramalho helped me a lot moving my troubleshooting back to the basics.

As the log explicitly told us the class 'views_handler_filter_entityreference_autocomplete' was not found in /var/www/mundolinux/profiles/openatrium/modules/contrib/oa_core/plugins/views/oa_core_og_group_ref_views_handler_filter_entityreference_autocomplete.inc, we opened that file and found this class actually extended another one:

class oa_core_og_group_ref_views_handler_filter_entityreference_autocomplete extends views_handler_filter_entityreference_autocomplete

So, we found the class views_handler_filter_entityreference_autocomplete on the file

/var/www/mundolinux/profiles/openatrium/modules/contrib/entityreference/views/views_handler_filter_entityreference_autocomplete.inc

(quite obvious)

Now, the only thing we did was to include that file on the ...profiles/openatrium/modules/contrib/oa_core/plugins/views/oa_core_og_group_ref_views_handler_filter_entityreference_autocomplete.inc

Here are the modified first lines

<?php

include "/var/www/mundolinux/profiles/openatrium/modules/contrib/entityreference
/views/views_handler_filter_entityreference_autocomplete.inc";

/**
 * @file
 * Code to override field to add in auto option.
 */

Of course, there must be a better place to have everything that is needed "included". We also still do not know what caused the problem. As it worked for us, though, we decided to publish this in here in order to help others who might be caught in the same trap.

Hardoman’s picture

Unfortunately, I just ran into the same trap. I did a fresh install of OpenAtrium the first time after a few years and created a space. I really enjoyed the new user interface and the features!
Afterwards the system recommended to update the modules, which I did. It ended in:

Fatal error: Class 'views_handler_filter_entityreference_autocomplete' not found in /var/www/htdocs/profiles/openatrium/modules/contrib/oa_core/plugins/views/oa_core_og_group_ref_views_handler_filter_entityreference_autocomplete.inc on line 8

I just tried Cesars solution (many thanks for sharing) but I discovered, I even don't have the appropriate file available, containing the class. I grep'ed for it to check that.

Thus, I have to reinstall the whole system again and have to avoid clicking the update button, except there would be another solution.

bas123’s picture

In Ceasar's fix (above), it is necessary to adjust the path to your own settings..
ie: /var/www/mundolinux must be replaced!

However, we have been searching for the actual file that contains the "class" definition as it doesn't appear that it resides in

/profiles/openatrium/modules/contrib/entityreference
/views/views_handler_filter_entityreference_autocomplete.inc

...

Has anyone found it?

v.oomen’s picture

I have found the views_handler_filter_entityreference_autocomplete.inc file on the following location:
DIR?/web//profiles/openatrium/modules/contrib/entityreference
/views/views_handler_filter_entityreference_autocomplete.inc, with the DIR? your own site-directory (for example /var/www/mundolinux). But, during the update-process, my views_handler_filter_entityreference_autocomplete.inc file was deleted (I guess, because I couldn't find it anywhere), so I had to download the file again and save it to the mentioned directory. Including the fix as proposed by Cesar, the error was gone. Thanks for the help everyone!

download of the views_handler_filter_entityreference_autocomplete.inc file

showmyroutes’s picture

v.oomen has provided the completed answer.

It looks like some how web_folder/OpenAtrium/openatrium-7.x-2.617/profiles/openatrium/modules/contrib/entityreference/views/views_handler_filter_entityreference_autocomplete.inc was not there and download the file from https://github.com/phase2/openatrium-drops-7/blob/master/profiles/openat....

In web_folder/OpenAtrium/openatrium-7.x-2.617/profiles/openatrium/modules/contrib/oa_core/plugins/views/oa_core_og_group_ref_views_handler_filter_entityreference_autocomplete.inc need to add the following line:

include "web_folder/OpenAtrium/openatrium-7.x-2.617/profiles/openatrium/modules/contrib/entityreference/views/views_handler_filter_entityreference_autocomplete.inc"

This fix the problem

Thanks v.oomen