When navigating to the sites link '/commitlog' the following PHP error and notice is thrown:

Fatal error: Call to a member function loadEntity() on a non-object in /var/www/html/cm7/sites/all/modules/versioncontrol/includes/views/handlers/versioncontrol_handler_field_operation_labels.inc on line 25

Notice: Undefined index: cvs in getRepository() (line 25 of /var/www/html/cm7/sites/all/modules/versioncontrol/includes/views/handlers/versioncontrol_handler_field_operation_labels.inc). 

Enabled are the Version Control API, Git Backend and Commit Log module.

Comments

marvil07’s picture

Title: Call to a member function loadEntity() on a non-object in views/handlers/versioncontrol_handler_field_operation_labels.inc » Add fail case for custom views field handlers getRepository

I see, the problem seems to be that you have rows inside versioncontrol_operations corresponding to cvs backend, which is not ported to D7, so not available.

I could just workaround about it, but I guess it can also be considered a by design: does not make sense to list commits which backend is not available, maybe yes.

Feedback is welcome.

GStegemann’s picture

OK, I understand your point.

But this issue can happen when a D6 site is ported to D7 while the CVS backend was installed and enabled. So maybe a migration path is needed. Or should I remove such entries manually from the versioncontrol_operations table? Or should all unsupported VCS backends be disabled and removed before a D6 site is ported?

However, in my opinion it makes sense to implement some safeguards to prevent such errors.