I have a same issue as #92.
May be worked around with hook_theme_suggestions_HOOK_alter?
mytheme_theme_suggestions_commerce_order_receipt_alter(&$suggestions, $variables) {
$buf = $suggestions[1];
$suggestions[1] = $suggestions[0];
$suggestions[0] = $buf;
}
krsort() may be applicable.
Based on your implication, I checked the browser console and noticed the error,
Refused to display 'https://dsrv.internal/' in a frame because it set multiple 'X-Frame-Options' headers with conflicting values ('DENY, SAMEORIGIN'). Falling back to 'deny'.
The root cause was the SSL/TSL parameter setting for apache2 of my test environment (ubuntu 24.04 VM):
/etc/apache2/conf-available/ssl-params.conf
Header always set X-Frame-Options DENY
I commented out the line and restart apache2, then the Nextcloud filepicker splendidly brought!
Then I impressively succeseed to insert the photograph hosted on Nextcloud into the article and save it. GREAT!!
I also sometimes experienced the hevy load as you menthioned, so I turned off aggregation of js. After taking the measure, it works fine. I tested with PHP 8.2 and 8.3 but note that xdebug is not used.
Thank you so so much for your help.
The error occurred after loading the node form. But I failed to open the filepicker and it seems not to be able to connect to the asset source.
The message says that it was blocked to connect.
In order to share my setup with you, I created GitHub project:
https://github.com/bkenro/nextcloud-dam-trial
I exported my current config into config/sync folder, so I hope you can restore it. Any comment is appreciated!
Thank you.
@aleix, thank you so much for your help. My procedure was as follows.
First I cloned the Drupal 10.4.0 project locally:
https://www.drupal.org/project/drupal/releases/10.4.0 →
After adding drush, I setup a new site with the standard profile:
drush site:install standard -y
then add the latest alpha Nextcloud DAM module:
composer require 'drupal/nextcloud_dam:^1.0@alpha'
and enabled it with its required modules as well:
According to the project's
"Post-Installation" guidance →
, I added the new Media field "field_nc" to the "article" content type. This field references the "Nextcloud image" Media type that was automatially created during module installation:
Next I moved to the "Manage form display" tab, and change the widget of the field_nc field to "Entity browser":
then click the gear icon and adjust the settings of the form field configs as described on the project page:
After that, the "Edit Widgets" under "Entity Browsers" config page looks as follows:
Next I tried to create new "article" node then I got the error:
The website encountered an unexpected error. Try again later.
I checked the watchdog and found the message entry:
TypeError: key(): Argument #1 ($array) must be of type array, null given in key() (line 424 of /var/www/demo/web/modules/contrib/entity_browser/src/Plugin/Field/FieldWidget/EntityReferenceBrowserWidget.php).
Here stucked... so I tried to create a new Media content from the path /media/add/nextcloud_image:
then I got the message again:
The website encountered an unexpected error. Try again later.
and found the message in the anotehr watchdog entry:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "nextcloud_media" plugin does not exist. Valid plugin IDs for Drupal\Core\Validation\ConstraintManager are: Callback, Blank, NotBlank, Email, Choice, Image, BlockContentEntityChanged, UniqueLabelInList, CKEditor5Element, CKEditor5ToolbarItemConditionsMet, CKEditor5FundamentalCompatibility, CKEditor5EnabledConfigurablePlugins, CKEditor5MediaAndFilterSettingsInSync, StyleSensibleElement, CKEditor5ToolbarItem, CKEditor5ToolbarItemDependencyConstraint, SourceEditingPreventSelfXssConstraint, SourceEditingRedundantTags, CommentName, DateTimeFormat, EntityBrowserImageDimensions, FileSizeLimit, FileExtensionSecure, FileImageDimensions, FileValidation, FileExtension, FileIsImage, FileUriUnique, FileNameLength, LinkType, LinkNotExistingInternal, LinkAccess, LinkExternalProtocols, MediaMappingsConstraint, oembed_resource, MenuTreeHierarchy, MenuSettings, PathAlias, TaxonomyHierarchy, ProtectedUserField, UserMailRequired, UserName, UserMailUnique, UserNameUnique, PluginExists, ExtensionExists, ExtensionName, ValidPath, UniquePathAlias, ImmutableProperties, EntityType, EntityChanged, ValidReference, ReferenceAccess, Bundle, EntityUntranslatableFields, EntityHasField, Uuid, ValidKeys, Count, AllowedValues, PrimitiveType, Length, FullyValidatable, ComplexData, UniqueField, Null, Range, CountryCode, NotNull, Regex, EntityBundleExists, LangcodeRequiredIfTranslatableValues, ConfigExists, RequiredConfigDependencies in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /var/www/dsrv/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Could you point out any mistake or missing in my setup?
Thank you.
bkenro → created an issue.
Sorry, the cause of the 500 error was incorrect permissions on the files folder. After adjusting that, I can now perfectly use Course Presentation and Interactive Video content types.
Thank you!
@florianturc,
Thank you so much for the detailed procedure. I could see the option of "Course Presentation" in the content types in h5p_editor at last. But when I tried to install the content type, failed with the "500 Service unavailable" error.
Keeping study the issue so I will report something new knowing.
My steps are below:
First, I followed your procedure and got the 2.0.x-dev version with the #3420268 patch applied.
Then I moved to the h5p module folder.
$ cd web/modules/contrib/h5p
and modified the lines under "require" key in composer.json file there from
"require": {
"h5p/h5p-editor": "1.25",
"h5p/h5p-core": "1.26"
},
to
"require": {
"h5p/h5p-editor": "^1.25",
"h5p/h5p-core": "^1.26"
},
and execute `composer update`, then got following messages,
$ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading h5p/h5p-core (1.26 => 1.27.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Upgrading h5p/h5p-core (1.26 => 1.27.0): Extracting archive
Generating autoload files
No security vulnerability advisories found.
to get the latest h5p packages (h5p-core and h5p-editor).
Then I replaced the h5p packages under project's vendor folder with ones in the vendor folder under the h5p module folder.
$ rsync -r ./vendor/h5p/ ../../../../vendor/h5p/ --delete
After cache clear, I successfully got the Course Presentation option, so I tried to the new content, but no luck wit 500 error.
bkenro → created an issue.