Commit Graph

11211 Commits

Author SHA1 Message Date
Benedek Farkas
8f4279627a Revert "Temporarily disabling the compile job"
This reverts commit c130566943.
2025-09-18 23:36:08 +02:00
Benedek Farkas
70ed45da22 Splitting up steps in the compile-node job of the compile workflow 2025-09-18 23:35:56 +02:00
Benedek Farkas
c130566943 Temporarily disabling the compile job 2025-09-18 22:02:58 +02:00
Benedek Farkas
4f9ae102db Fine-tuning the compile-node job in the compile workflow 2025-09-18 22:02:29 +02:00
Andrea Piovanelli
b14c29503b #8565: Delete and Unpublish buttons in backoffice content edit (#8566)
Some checks failed
Compile / Compile .NET solution (push) Has been cancelled
Compile / Compile Client-side Assets (push) Has been cancelled
* Added publish and delete buttons to backoffice content edit.

* Corrected condition for content unpublishing.
Managed unpublish and delete button for blogs and widgets.

* Some little code refactoring

* Added css classes for unpublish-button.
Condition for delete button visibility now checks for contentItem.Id > 0 instead of IsNew() function

* Removed UnpublishButton from Widget Editor.

* Removed Widget_DeleteButton to use the generic Content_DeleteButton shape and avoid its duplication or confusing management via Placement.info.

* Removed Widget_UnpublishButton shape

* Removed unpublish button show/hide logic from driver.
Added comments to clarify how new Unpublish and Delete actions work.

* EOL fix to Orchard.Widgets.csproj.

* Added unpublish button to edit widget (shown if widget is draftable only)

* Hide Content edit delete button at frontend

* ContentsDriver: removed AdminFilter check to display delete button and checked the content is published before showing the unpublish button.

* Applied some of the proposed formatting changes

* Several refactoring operations

* Autoformatting.

* Stylesheet refactoring and reorganization to properly position backoffice buttons

* Autoformatting

---------

Co-authored-by: Alessandro Agostini <alessandro.agostini@laser-group.com>
Co-authored-by: Matteo Piovanelli <matteo.piovanelli@laser-group.com>
2025-06-13 16:17:11 +02:00
Marek Dzikiewicz
d310fb56e1 #8832: Add LazyLoadConvention (#8833)
Some checks failed
Compile / Compile .NET solution (push) Has been cancelled
Compile / Compile Client-side Assets (push) Has been cancelled
2025-04-17 10:03:42 -07:00
Marek Dzikiewicz
4c463287ca #8828: Expose Redis API to clear multiple keys using wildcard syntax (#8829)
* #8828: Expose Redis API to clear multiple keys using wildcard syntax

* #8828: Rename IRedisCacheStorageProvider to ICacheStorageProviderWithKeyPrefix

* Moving ICacheStorageProviderWithKeyPrefix to Orchard.Caching

---------

Co-authored-by: Benedek Farkas <benedek.farkas@lombiq.com>
2025-04-16 14:28:43 +02:00
Andrea Piovanelli
3561be6e37 Moved embed video import to a dedicated service. (#8827)
Some checks failed
Compile / Compile .NET solution (push) Has been cancelled
Compile / Compile Client-side Assets (push) Has been cancelled
2025-02-04 12:55:39 +01:00
Benedek Farkas
5c3d045aa1 #8800: Reverting breaking changes to Enumeration Fields caused by #8789 (#8824)
Some checks failed
Compile / Compile .NET solution (push) Has been cancelled
Compile / Compile Client-side Assets (push) Has been cancelled
* Revert "#8640: Fixing consistency between different Enumeration Field flavors' data storage (#8789)"

This reverts commit fdbb06ba8d.

* Re-adding change to fix that changing the ListMode of an EnumerationField from a multi-select to a single-select flavor shouldn't break the editor

* Code styling in Fields/Enumeration.Edit.cshtml
2025-01-23 11:59:24 +01:00
Benedek Farkas
32c5f1e821 #8822: Upgrading MailKit to 4.9.0 and consolidating all NuGet packages (#8823)
Some checks failed
Compile / Compile .NET solution (push) Has been cancelled
Compile / Compile Client-side Assets (push) Has been cancelled
* Upgrading MailKit to 4.8.0 and consolidating all NuGet packages

* Upgrading MailKit to 4.9.0 and consolidating dependency package versions
2025-01-17 19:22:19 +01:00
Benedek Farkas
d26e8e47f1 #8232: Adding warnings when a Projection Query has an empty Filter Group (#8813)
Some checks failed
Compile / Compile .NET solution (push) Has been cancelled
Compile / Compile Client-side Assets (push) Has been cancelled
* Projections: Returning empty list of content items instead of every content item when the query has no filters

* Better solution to skip processing empty filter groups, instead of returning nothing when there's an empty filter group

* Code styling and comments

* Code styling in ProjectionPartDriver, QueryPartDriver and ProjectionManager

* Reverting functional change to ignore empty filter groups

* Code styling in AdminController, ProjectionPartDriver and QueryPartDriver

* Adding notification when saving a Query or a ProjectionPart to warn about the effect of an empty filter group

* Fixing that upgrading Newtonsoft.Json 13.x broke the SpecFlow test execution app
2025-01-14 17:22:02 +01:00
Benedek Farkas
1c40b8ba93 #8808: Fixing Container admin navigation (#8809)
* Fixing that Core.Containers "Show on admin menu" functionality shouldn't depend on the Orchard.Lists feature

* Moving menu.list.png admin menu icon from Orchard.Lists to Core.Containers as menu.container.png

to fix that Containers should have a default admin menu icon

* Fixing conflict between lists and container admin navicon by applying the unused menu.list-definition.png to lists

* Code styling and removing duplicate code
2024-12-10 09:30:58 +01:00
Benedek Farkas
c3b98ba3c4 #8819: Compile workflow should run at least one of the SpecFlow tests (#8820)
* Using Title Casing in the Compile workflow's step names

* Adding step to run the Setup with SpecFlow

* Fixing typo

* Fixing that upgrading Newtonsoft.Json to 13.x broke the SpecFlow test execution app
2024-12-07 20:48:21 +01:00
Benedek Farkas
ebae790f15 #8276: Updating Npgsql to 4.0.17 and fixing setup with PostgreSQL (#8810)
* Updating Npgsql to version 4.0.17 (the latest minor version of the closest major version that isn't vulnerable)

https://github.com/OrchardCMS/Orchard/security/dependabot/54

* Fixing that Projection Migrations created indexes with the same name in different tables, which is not supported by PostgreSQL
2024-12-06 14:14:57 +01:00
Benedek Farkas
79f66cebf6 #8752: Publish/unpublish Menu Items in the Menu editor (#8807)
* Cleaning up Core/Navigation/Controllers/AdminController

* Extending Core/Navigation/Controllers/AdminController to be able to publish/unpublish menuitems

* Redirecting to menu when saving a menu item and using the menu item text in the notification

* Fixing that saving a menu item shouldn't publish it if it's unpublished

* Using the menu item text in the notification when publishing and unpublishing too
2024-12-06 10:09:52 +01:00
Benedek Farkas
0d93cb1d8d #8816: Compilation workflow should test the setup and code generation (#8817)
* Updating Compile workflow with setup and code generation steps

* Updating NHibernate reference and OrchardBasicCorrectness.ruleset path in ModuleTestsCsProj code generation template

* Ignoring CS2008 warning when recompiling with generated modules, because the theme and test projects don't have .cs files

* Generating a test project should also include packages.config

* Fixing the relative path of Orchard.Core and Orchard.Framework in the generated test project

* A bit of code styling in the Compile workflow

* Updating Readme

* Revert "A bit of code styling in the Compile workflow"

This reverts commit 7b01ebbad0.
2024-12-06 09:59:15 +01:00
Benedek Farkas
8425b4ad76 #8811: Update vulnerable NuGet packages and consolidate them (#8812)
* Updating System.IdentityModel.Tokens.Jwt and its dependencies in Orchard.Azure.MediaServices

* Using System.IO.Compression instead of DotNetZip

* Upgrading Newtonsoft.Json from 12.0.3 (vulnerable) to 13.0.3

* Updating ModuleRootWebConfig.txt codegen template according to the new Newtonsoft.Json version
2024-12-06 09:49:45 +01:00
Andrea Piovanelli
81570fab35 Internal page links validation for LinkField (#8805)
Some checks failed
Compile / Compile .NET solution (push) Has been cancelled
Compile / Compile client-side assets (push) Has been cancelled
* Added page internal references management in LinkField valid urls (e.g. field.Value = "#someId")

* Code refactoring to check LinkField value.
2024-10-29 09:14:13 +01:00
Benedek Farkas
0d9fccb624 Fixing WebDownloaderTests 2024-05-03 15:33:07 +02:00
Benedek Farkas
fdbb06ba8d #8640: Fixing consistency between different Enumeration Field flavors' data storage (#8789)
* Reworking EnumerationField's logic to store/retrieve its (selected) values

* Fixing exception when creating new item with CheckboxList flavor, adding more nullchecks and compactness

* Code styling in EnumerationFieldDriver

* Code styling in EnumerationField editor template

* Fixing that EnumerationFieldDriver and the EnumerationField editor template should read SelectedValues instead of Values directly

---------

Co-authored-by: Matteo Piovanelli <MatteoPiovanelli-Laser@users.noreply.github.com>
2024-04-19 11:11:47 +02:00
Benedek Farkas
15cad85d1e #6793: Adding a content-independent culture selector shape for the front-end (#8784)
* Adds a new CultureSelector shape for front-end

* fixed query string culture change

* Moving NameValueCollectionExtensions from Orchard.DynamicForms and Orchard.Localization to Orchard.Framework

* Code styling

* Simplifying UserCultureSelectorController and removing the addition of the culture to the query string

* EOF empty lines and code styling

* Fixing that the main Orchard.Localization should depend on Orchard.Autoroute

* Code styling in LocalizationService

* Updating LocalizationService to not have to use IEnumerable.Single

* Matching culture name matching in LocalizationService culture- and casing-invariant

---------

Co-authored-by: Sergio Navarro <jersio@hotmail.com>
Co-authored-by: psp589 <pablosanchez589@gmail.com>
2024-04-18 23:35:48 +02:00
Benedek Farkas
0b86413e60 6748: Stricter file and folder name validation (#6792)
* Media Library: More strict file and folder name validation, fixes #6748

* Resetting MediaLibraryService changes to 1.10.x

* Code styling in FileSystemStorageProvider

* Adding string file and folder name validation to FileSystemStorageProvider, so that MediaLibrary components don't need to do it separately

* Applying the same file and folder name validation to AzureFileSystem too

* Code styling and fixes in AzureFileSystem, MediaLibrary and IStorageProvider

* Simplifying invalid character detection

* Code styling

* Adding InvalidNameCharacterException to be able to handle invalid characters precisely at various user-facing components

* Updating MediaLibrary not to log an error when a file can't be uploaded due to invalid characters

---------

Co-authored-by: Lombiq <github@lombiq.com>
2024-04-18 21:37:48 +02:00
Benedek Farkas
3a6810ec67 8225: Adding a checkbox to StringFilterForm to control whether an empty value should cause the filter to be skipped (#8781)
* Adding a checkbox to StringFilterForm to control whether an empty value should cause the filter to be skipped

* Removing StringOperator.ContainsAnyIfProvided as its now obsolete due to the IgnoreFilterIfValueIsEmpty checkbox setting

* Code styling in StringFilterForm

* Adding missing T-string

* Adding migration step to upgrade from using the ContainsAnyIfProvided operator in StringFilterForm
2024-04-17 11:52:51 +02:00
Thierry Fleury
04e9c73391 8012: Add Excel Export functionality to DynamicForms (#8016)
* Add Excel Export functionality to DynamicForms.

* Using the net46-targeted DLL of DocumentFormat.OpenXml instead of net40

* Updating DocumentFormat.OpenXml to latest (3.0.2) version

* Code styling

---------

Co-authored-by: Benedek Farkas <benedek.farkas@lombiq.com>
2024-04-16 16:59:14 +02:00
Benedek Farkas
530d2a9221 8773: Recompiling client-side assets on 1.10.x (#8779)
* Updating rebuilt client-side assets that only changed in terms of sourceMappingURL

* Updating rebuilt client-side assets that changed functionally

* Fixing/simplifying Layout editor toolbox stickyness and height restriction to viewport

* Compile workflow: Upgrading actions/checkout and microsoft/setup-msbuild actions to their latest versions

* Compile workflow: Adding steps to validate that the client-side assets are up-to-date

* Compile workflow: Temporarily disabling MSBuild steps

* Moving client-side assets build to a separate job in the compile workflow

* Updating client-side compilation job

* Temporarily disabling the .NET build

* Separating package install from asset rebuild

* Adding debug command

* Fixing working directory

* Debugging

* Attempting to get rid of false positives due to line ending changes

* Removing debug code

* Checking asset validation by modifying Orchard.Resources/Assets/Less/Bootstrap/variables.less, but not its derivatives

* Revert "Checking asset validation by modifying Orchard.Resources/Assets/Less/Bootstrap/variables.less, but not its derivatives"

This reverts commit 3fc9b8362b.

* Revert "Temporarily disabling the .NET build"

This reverts commit 2a8fef7793.

* Fixing error message when client-side assets are not up-to-date
2024-04-16 16:55:04 +02:00
Hazzamanic
8086c01fb8 7919: The Alias UI links for sites using UrlPrefix are broken (#7930)
* AliasUI: removing UrlPrefix addition to url. Fixing issue in Href() that strips first / in urls for sites using UrlPrefix

* Simplifying fix for WebViewPage.Href for tenants with URL prefix

* Code styling WebViewPage

---------

Co-authored-by: Benedek Farkas <benedek.farkas@lombiq.com>
2024-04-11 21:41:34 +02:00
Benedek Farkas
fb1aa73475 8776: Upgrade Microsoft.CodeDom.Providers.DotNetCompilerPlatform to latest version (#8777)
* Upgrading projects, code generation templates and Specflow app to use Microsoft.CodeDom.Providers.DotNetCompilerPlatform 4.1.0 (latest)

* Updating csprojs not to define LangVersion separately in Release and Debug mode, setting it to "default" instead of "latest"

* Restricting C# language version to 7.3

* Downgrading SmtpMessageChannel.cs to C# 7.3

* Setting MvcBuildViews = false in the remaining csprojs that reference DotNetCompilerPlatform, like the others

* Setting RoslynCopyToOutDir = false in each csproj that references DotNetCompilerPlatform

See https://github.com/aspnet/RoslynCodeDomProvider?tab=readme-ov-file#build-time-options
- We only need Orchard.Web to include the Roslyn tools in its bin folder, the other csprojs only need the DLL reference
- We could simply remove the targets import in these csprojs, but it will be re-added when the package is updated, so this is cleaner/easier

* We don't actually need <MvcBuildViews>false</MvcBuildViews> in csprojs

* Orchard.Web: Copying Roslyn files to the output folder using the provided target (CopyRoslynCompilerFilesToOutputDirectory) instead of our custom one

* Orchard.proj: Factoring out a part of the Compile target into the DevCompile target and removing BuildViews target

- For a simple local build (just to validate that the solution builds), we don't actually need that second build that copies files to the output folder.
- CI builds (Test, Spec, etc.) that operate on the build output folder are unaffected, because Compile calls DevCompile
- The BuildViews target is not really necessary, just call any other target (Compile, DevCompile, Spec, etc.) with "/p:MvcBuildViews=true"

* Removing incorrect comment about Razor IntelliSense

* Removing VBCodeProvider configuration from Web.config files

* Getting rid of Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets imports and associated configuration except in Orchard.Web.csproj

* Adding VB compiler configuration to src/Orchard.Web/Web.config, because it would be readded on rebuild by the imported target anyway
2024-04-04 16:35:29 +02:00
Benedek Farkas
5aaf46bcde Setting MSBuild log verbosity to minimal in the compile workflow 2024-03-18 12:03:36 +01:00
Benedek Farkas
005338403d gitignore: Fixing the pattern that ignores ".vs" folders at any level and moving VS-related patterns to the correct location 2024-03-16 18:44:56 +01:00
dmhiggins23
1900b35cd5 Updated ClickToBuild.cmd to support VS2019 (v16) and VS2022 (v17) (#8764)
Removed support for eariler MSBuild versions (they cannot compile SmtpMessageChannel.cs)

Updated lib/nuget/nuget.exe to latest version (6.9.1.3) (required for package restoration)

Modified Obsolete attribute in SmtpSettingsPart.cs so the solution builds with VS2019
2024-03-15 10:18:40 +01:00
Andrea Piovanelli
2d7ce45d1e TermsPart.Record usage made before the delegate to avoid accessing a scope which is already disposed. (#8766) 2024-03-15 08:55:07 +01:00
Benedek Farkas
50d416c9f2 Projections: Consolidating Migration Update steps into Create 2024-03-01 20:46:50 +01:00
Andrea Piovanelli
35f1c8d570 Corrections on media resizing process (#8762)
* Added checks to GetImageProfileUrl function to avoid trying to resize files with no ImagePart. If no content item is passed as a parameter, file gets to be processed anyway (throwing and logging exception is the file isn't processable - e.g. is a svg file)

* Added reference to Orchard.MediaLibrary.
2024-02-29 19:39:32 +01:00
Matteo Piovanelli
c7d10fd0be When chaining tokens, if nothing was selected in a CPF, evaluation would log (#8763)
and error because it would seek an item out of the range of the array.
2024-02-29 19:38:48 +01:00
Andrea Piovanelli
90dc993e83 Using content item's ContentManager for lazy field loading instead of the injected one (#8761) 2024-02-29 19:37:54 +01:00
Alessandro Agostini
44bfa390bc Feature/maxlengthsetting (#8719)
* added MaxLength setting for TextField

# Conflicts:
#	src/Orchard.Web/Modules/Orchard.Taxonomies/Settings/TaxonomyFieldEditorEvents.cs

* added MaxLength setting for TitlePart

* added missing files

* Removed where clause

* changed title length to a constant and updated the recipe

* added comment to remind people to update the migration when they change the constant introduced previously

* fixed hint text for title

* fixed maxLength initialization in TitlePartSettings.cshtml

* MaxTitleLength constant is now Pascal case

* Correction on constant spelling in TitlePartSettings shape.

---------

Co-authored-by: Andrea Piovanelli <andrea.piovanelli@laser-group.com>
2024-02-21 11:28:09 +01:00
Andrea Piovanelli
eb09ab7f95 Added data annotation to have a proper validation on MenuText length based on its maximum length on database. (#8757) 2024-02-21 11:21:13 +01:00
Andrea Piovanelli
d46f26d4c7 Added chain to Slug token to enable TextTokens for Autoroute configuration. (#8755) 2024-02-21 11:18:33 +01:00
RichieOrtiz
90b104ed74 Updated XML helper to support storing and parsing of Guid (#8717)
* Updated XML helper to support storing and parsing of Guid

* Adding Guid and Guid? assertions to XmlHelperTests

* Restoring XmlHelper

* Adding Guid and Guid? assertions to XmlHelperTests

---------

Co-authored-by: Benedek Farkas <benedek.farkas@lombiq.com>
2024-02-07 10:09:07 +01:00
Matteo Piovanelli
97648ed5a2 Implemented ability to add localizations of selected terms to filter (#8730) 2024-01-19 16:41:29 +01:00
Andrea Piovanelli
d943fbd83e Added StringComparer and forced lowercase where needed to ensure matching paths to ignore casing. (#8743) 2024-01-19 10:29:52 +01:00
Matteo Piovanelli
e013e00dd4 Prevent TermsFilter from having to deal with empty strings (#8727)
* Prevent TermsFilter from having to deal with empty strings:
filter them out before parsing them to int
in form, convert taxonomies to OptionGroups rather than options with no value

* Update src/Orchard.Web/Modules/Orchard.Taxonomies/Projections/TermsFilter.cs

Co-authored-by: Sébastien Ros <sebastienros@gmail.com>

---------

Co-authored-by: Sébastien Ros <sebastienros@gmail.com>
2024-01-15 17:15:33 +01:00
Hermes Sbicego
9644ceda1f self closing divs ar not a W3C valid markup: Self-closing syntax (/>) used on a non-void HTML element. Ignoring the slash and treating as a start tag. (#8738) 2023-11-17 21:44:27 +01:00
Hermes Sbicego
4e73190ae5 Makes upgrade to Mailkit fully backward compatible 2023-11-10 08:49:36 +01:00
Andrea Piovanelli
03884cbd64 Lazy field loading using content item ContentManager instead of the injected one. (#8725)
* Lazy field loading using content item ContentManager instead of the injected one.

* Removed unused _contentManager variable
2023-10-27 09:22:24 +02:00
Hermes Sbicego
a4be7c68cb Fixes null culture (#8723)
Fixes null culture bug and prevents to query the database if the requested culture is null or empty
2023-09-29 08:42:13 +02:00
Hermes Sbicego
ba0daf3cb0 Improve Orchard.Layouts UX (#8721) 2023-09-01 10:23:36 +02:00
Lucio Fassio
b854839a28 Implements the "scale" filter to prevent image degradation (#8713) 2023-07-31 15:29:15 +02:00
Hermes Sbicego
d8bb23a4c4 Update SslSettingsPartHandler.cs (#8715)
Adds the OnUpdated handler in order to Invalidate the cache of the settings
2023-07-21 08:03:42 +02:00
József Horváth
274b4416ec Using MailKit instead of SmtpClient (ORCH-267) (#8707)
* Using MailKit instead of SmtpClient

* Removing 2 more references to System.Net.Http that we hopefully don't need at all anymore

* Attempting to fix Razor compilation warning about Orchard.Email's reference to System.Net.Http

* Improving SmtpSettings.cshtml a bit (port number restrictions, user name box width)

* Fixing encription method is not persisted

* Adding migration step to migrate from EnableSsl to EncryptionMethod in SmtpSettingsPart

* Code styling/simplifications

* Using infoset default values instead of Migrations to keep SSL settings when upgrading to MailKit

---------

Co-authored-by: Lombiq <github@lombiq.com>
Co-authored-by: Benedek Farkas <benedek.farkas@lombiq.com>
2023-07-17 09:58:16 +02:00