After trying to upgrade to 8.5.0-beta1 aswell as following upgrade path for Media entity module we have errors on our site, I tried to go back to 8.4.4 (dump) and do the update again but it resulted in getting these errors.
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Core\Database\DatabaseExceptionWrapper</em>: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision.revision_default' in 'field list': SELECT revision.vid AS vid, revision.langcode AS langcode, revision.revision_user AS revision_user, revision.revision_created AS revision_created, revision.revision_log_message AS revision_log_message, revision.revision_default AS revision_default, base.mid AS mid, base.bundle AS bundle, base.uuid AS uuid, CASE base.vid WHEN revision.vid THEN 1 ELSE 0 END AS isDefaultRevision
FROM
{media} base
INNER JOIN {media_revision} revision ON revision.vid = base.vid
WHERE base.mid IN (:db_condition_placeholder_0); Array
(
[:db_condition_placeholder_0] => 1
)
in <em class="placeholder">Drupal\Core\Entity\Sql\SqlContentEntityStorage->getFromStorage()</em> (line <em class="placeholder">455</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php</em>).
To resolve this i managed to do so with adding manually a column 'revision_default' on the table: 'media_revision'. So i could access my website.
But if i go to content/media, or try to add media types it works, but creating a new media or editing an existing one (i had only one so far) results in this error:
<em class="placeholder">Drupal\Component\Plugin\Exception\PluginNotFoundException</em>: The "media_bundle" entity type does not exist. in <em class="placeholder">Drupal\Core\Entity\EntityTypeManager->getDefinition()</em> (line <em class="placeholder">133</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/EntityTypeManager.php</em>
Comments
Comment #2
cilefen commentedComment #3
berdirAs mentioned in the issue where this was reported initially
> Drupal\Component\Plugin\Exception\PluginNotFoundException: The "media_bundle" entity type does not exist.
Indicates a mix between core media and contrib media_entity. Only contrib media_entity had the media_bundle entity type, it is now media_type in core.
Is media_entity still installed? Do you have any modules that refer to media_bundle? What is the full backtrace of that error? (set error display to verbose through settings.php or before updating).
Did you start with 8.4 and core media or did you upgrade from media_entity?
Does drush entup report anything when you run it in 8.4 before the update?
The code that should add this field is in https://cgit.drupalcode.org/drupal/tree/core/modules/system/system.insta.... It adds it to all entity types that are revisionable. If it doesn't add it to media then because it thinks that it is not revisionable or alternatively, it doesn't run at all. Try adding some debug statements there or use an actual debugger to see what's going on.
Comment #4
karimbou commentedI updated from 8.4.4 following the media_entity upgrade path. -> Without any errors, drush mecu worked fine so the 'revision_default' issue is fixed.
After searching in the codebase, i disabled "Hide Revision Field Module" and the error missing 'media_bundle' disappeared.
So i guess this is issue is related to the hide_revision_field module.
Comment #5
berdirI was able to reproduce now by doing the media and 8.5 update at the same time. This might indeed have been caused by that other issue, but I was able to fix it in media_entity: #2947520: media_entity update path needs to run after system_update_8501 when updating to 8.5.x at the same time.
And yes, hide_revision_field module seems to have specific code for media_entity, it will need to be updated, usually that's done as a new branch. You might want to mention it in #2860796: Plan for contributed modules with Media Entity API in core
Comment #6
cilefen commentedComment #7
cilefen commented#2951279: After 8.5.0 upgrade: Unknown column revision.revision_default
Comment #8
kevinquillen commentedI am getting this error after upgrading:
Comment #9
NikaDevs commentedHi,
I have the same issue after update to 8.5 version, I'm also have a pending update in the update.php script "Notice: Undefined index: dropzonejs_eb_widget_updates in " which can't be runned - may be this can cause a problem?
Thanks.
Comment #10
berdirClosing this as duplicate of my media issue and the other issue mentioned in #7 that is not media specific. Please see my comment over there.
The dropzonejs related notices is likely a bug from that module, caused by using dropzonejs but not media/media_entity. See https://www.drupal.org/project/dropzonejs/issues/2915745#comment-12516372 for example.
Comment #11
svdhout commentedUpgrading to 8.5 before switching to media instead of at once did indeed solve the issue for me