Commit Graph

11778 Commits

Author SHA1 Message Date
Benedek Farkas
7f2e467ab8 Upgrade: Adding System.Net.Http assembly binding redirect 2024-04-05 16:43:35 +02:00
Benedek Farkas
f30a472cb3 Removing SharpZipLib package and references as its no longer used 2024-04-04 21:21:53 +02:00
Benedek Farkas
3ce50256f9 Updating Microsoft.CodeDom.Providers.DotNetCompilerPlatform to version 4.1.0 in dev-only extensions too
Continuation of https://github.com/OrchardCMS/Orchard/pull/8777
2024-04-04 21:16:46 +02:00
Benedek Farkas
39ea4c7f79 Merge branch '1.10.x' into issue/8773
# Conflicts:
#	.gitignore
#	ClickToBuild.cmd
#	lib/nuget/nuget.exe
#	src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj
#	src/Orchard.Azure/Orchard.Azure.Web/Web.config
#	src/Orchard.Web/Core/Orchard.Core.csproj
#	src/Orchard.Web/Modules/Lucene/Lucene.csproj
#	src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj
#	src/Orchard.Web/Modules/Orchard.CustomForms/Orchard.CustomForms.csproj
#	src/Orchard.Web/Modules/Orchard.DynamicForms/Orchard.DynamicForms.csproj
#	src/Orchard.Web/Modules/Orchard.DynamicForms/packages.config
#	src/Orchard.Web/Modules/Orchard.Roles/Orchard.Roles.csproj
#	src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj
#	src/Orchard.Web/Modules/Orchard.Taxonomies/Orchard.Taxonomies.csproj
#	src/Orchard.Web/Modules/TinyMce/TinyMce.csproj
2024-04-04 20:53:50 +02:00
Benedek Farkas
832a0c8515 Merge branch 'dev' into issue/8773 2024-04-04 20:43:19 +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
Matteo Piovanelli
151bb12ce6
Minor fixes for localizations (#8726)
* wip fixing Fields/TaxonomyFieldList.cshtml

* restored selector for expando label/handle

* cleanup

* fixed comparison to find parent blog

# Conflicts:
#	src/Orchard.Web/Modules/Orchard.Blogs/BlogsLocalizationExtensions/Handlers/BlogPostPartHandler.cs

* fixed initialization of localizedtaxonomyfields

* Checks culture equality based on strings instead of culture records

* If term is culture neutral it is added to the applied terms list without looking for its localization.

# Conflicts:
#	src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/LocalizedTaxonomyController.cs

* Added AdminLocalizedTaxonomyController to properly managed localized taxonomies back office calls.

# Conflicts:
#	src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/LocalizedTaxonomyController.cs
#	src/Orchard.Web/Modules/Orchard.Taxonomies/Views/EditorTemplates/Fields/TaxonomyFieldList.cshtml

* Added selectedValues parameter to controller call

---------

Co-authored-by: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Co-authored-by: Andrea Piovanelli <andrea.piovanelli@laser-group.com>
2024-04-02 08:56:47 +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
9b57673e9a Resetting the branch to a803d7bc2d by reverting the recent commits related to System.Net.Http.dll 2024-03-18 11:58:25 +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
Matteo Piovanelli
4a05e77775
Memorize results of queries to prevent repeated execution within a request (#8775) 2024-03-15 09:05:48 +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
5f34102f70 Uploading MSBuild log as artifact 2024-03-11 17:29:05 +01:00
Benedek Farkas
068b616b8a Maybe we don't need the System.Net.Http assembly reference in the Orchard.Email web.config anymore? 2024-03-11 15:43:29 +01:00
Benedek Farkas
d2f4d7ec53 Attempting to free Orchard from the DLL-hell 2024-03-11 15:31:48 +01:00
Benedek Farkas
eaa432260e Fixing System.Net.Http publicKeyToken in assembly binding redirect 2024-03-11 15:04:36 +01:00
Benedek Farkas
2fd4d28c8b Attempting to fix Razor compilation warning (error) regarding System.Net.Http 2024-03-11 15:02:53 +01:00
Benedek Farkas
a803d7bc2d Revert "Temporary email test setup"
This reverts commit 5e928e7980.
2024-03-11 14:43:50 +01:00
Benedek Farkas
8449eade95 SmtpMessageChannel: Fixing that the "reply to" address should fall back to site settings if not provided in the current email 2024-03-11 14:28:13 +01:00
Benedek Farkas
44dcc86386 SmtpMessageChannel: Simplifying the processing of the "from" address 2024-03-11 14:25:59 +01:00
Benedek Farkas
b5ad09e6db Making SmtpMessageChannel.ParseRecipients more fault-tolerant to simplify its usage 2024-03-11 14:22:10 +01:00
Benedek Farkas
5e928e7980 Temporary email test setup 2024-03-11 12:07:40 +01:00
Benedek Farkas
041a3613bc Merge branch 'dev' into issue/8773 2024-03-10 22:40:23 +01:00
Benedek Farkas
2d0630da69 Fixing that some Workflows activities were not rendered correctly in the workflow editor
They were just rendered as a small, empty rectangle:
- Unassign Role activity styling was syntactically incorrect
- Send Email and Is In Role activity styling file name did not match what the Workflows ResourceManifest expects
2024-03-10 22:39:57 +01:00
Benedek Farkas
8dec61baab Updating jQueryUI to version 1.13.2 (July 14, 2022) to mitigate some incompatibilities with jQuery 2024-03-10 21:52:24 +01:00
Benedek Farkas
d80513aba0 Merge branch 'issue/8773-1.10.x' into issue/8773 2024-03-10 19:23:02 +01:00
Benedek Farkas
391c032bf3 Gulpfile: Updating TS compilation options to fix TS6131 error
"Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'"

Also recompiling client-side assets, but the changes are not the result of the compiler option change, they were just outdated
2024-03-10 19:15:08 +01:00
Benedek Farkas
c420676ba0 Fixing/simplifying Layout editor toolbox stickyness and height restriction to viewport 2024-03-10 00:13:47 +01:00
Benedek Farkas
13bbb43e35 Updating rebuilt client-side assets that changed functionally 2024-03-09 12:55:32 +01:00
Benedek Farkas
7226b06142 Updating rebuilt client-side assets that only changed in terms of sourceMappingURL 2024-03-09 12:55:00 +01:00
Benedek Farkas
bfe5671e9d Adding verbosity = minimal to msbuild commands in the specflow workflow too 2024-03-09 11:22:17 +01:00
Benedek Farkas
f667d00843 Adding verbosity = minimal to msbuild commands in the compile workflow 2024-03-09 11:13:19 +01:00
Benedek Farkas
358744e8c0 Fixing merge error in Orchard.Projections/Migrations.cs 2024-03-08 19:34:09 +01:00
Benedek Farkas
f2f3a25afa Fixing build warning 2024-03-08 19:00:52 +01:00
Benedek Farkas
049cc6a371 Re-applying logic to ask for an email read notification from 7c725bf2ec 2024-03-08 18:51:03 +01:00
Benedek Farkas
c8c5196b18 Re-applying logic to send attachments from 46c3fe6e79 2024-03-08 18:50:07 +01:00
Benedek Farkas
0fb45b445a Re-applying FromAddress/FromName changes from 1c93e4a501 2024-03-08 18:45:45 +01:00
Benedek Farkas
0e1129ec74 Re-applying change from 6ea2b8c7f4 (Log error when Recipient emailMessage.Recipients is null) 2024-03-08 18:28:53 +01:00
Benedek Farkas
52b40538ce Resolving merge conflict in MediaLibraryPickerFieldHandler between fd3ad79dca and 03884cbd64 2024-03-08 18:21:06 +01:00
Benedek Farkas
ccdeeab4d6 Fixing merge + code styling 2024-03-08 18:17:52 +01:00
Benedek Farkas
bfe1e6aa01 Merge branch '1.10.x' into issue/8773
# Conflicts:
#	src/Orchard.Web/Core/Common/Views/Body-Large.Editor.cshtml
#	src/Orchard.Web/Core/Common/Views/Body-Small.Editor.cshtml
#	src/Orchard.Web/Core/Common/Views/Body-Textarea.Editor.cshtml
#	src/Orchard.Web/Core/Common/Views/Body-Wide.Editor.cshtml
#	src/Orchard.Web/Core/Common/Views/EditorTemplates/Fields.Common.Text.Edit.cshtml
#	src/Orchard.Web/Modules/Orchard.Email/Migrations.cs
#	src/Orchard.Web/Modules/Orchard.Email/Models/SmtpSettingsPart.cs
#	src/Orchard.Web/Modules/Orchard.Email/Orchard.Email.csproj
#	src/Orchard.Web/Modules/Orchard.Email/Services/SmtpMessageChannel.cs
#	src/Orchard.Web/Modules/Orchard.Email/packages.config
#	src/Orchard.Web/Modules/Orchard.Layouts/Scripts/LayoutEditor.js
#	src/Orchard.Web/Modules/Orchard.Layouts/Scripts/LayoutEditor.min.js
#	src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.css
#	src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.min.css
#	src/Orchard.Web/Modules/Orchard.MediaLibrary/Handlers/MediaLibraryPickerFieldHandler.cs
#	src/Orchard.Web/Modules/Orchard.Projections/Migrations.cs
#	src/Orchard.Web/Modules/Orchard.Taxonomies/Settings/TaxonomyFieldEditorEvents.cs
2024-03-08 15:04:03 +01:00
Benedek Farkas
54ab14b356
8686: Fixing build and tests on dev (#8695)
* Fixing that RecipeManagerTests failed due to HttpContext not being available

* Fixing OwnerEditor tests in CommonPartProviderTests as the owner editor now checks for a different permission since 5b0c82d1ad

* Fixing typo in CommonPartProviderTests.UpdateModelStub class name

* Fixing that test cases for invalid path in FileSystemStorageProviderTests broke in a3e9bef3ca (issue #6802, PR #6919)

I should review PRs more carefully!

* Fixing CurrentCultureWorkContextTests

* Fixing indentation in DefaultDateFormatterTests

* Updating Orchard.Azure.Web's required version of System.Web.Mvc to match the rest of the solution

* Orchard.Specs: Fixing assembly loading errors when starting up the web host by adding binding redirects

* Adding empty compile workflow from dev

* Adding the compile workflow's actual contents

* Changing default shell to pwsh (msbuild was not found in cmd?)

* Adding msbuild to PATH

* Removing unused references to System.Net.Http

* Replacing System.Net.Http references with its NuGet package to pin the correct version number (experimental)

* Upgrading Microsoft.CodeDom.Providers.DotNetCompilerPlatform to 4.1.0 (latest) to get rid of old System.Http.Net dependency

* Orchard.proj: Spec target actually depends on only the Compile target, not Package-Stage (experimental)

* Compile workflow: Testing the Test and Spec targets

* Fixing Test step

* Fixing compile workflow to also mark Razor compilation warnings as errors

* Restoring Orchard.Specs/Hosting/Orchard.Web/Web.config to match Orchard.Web's web.config closer

so that it loads assemblies from the Dependencies folder.
This fixes the error with Autofac not being able to resolve dependencies for DefaultOrchardShell

* Orchard.Specs/Hosting/Orchard.Web/Global.asax.cs: Workaround for AntiForgeryToken bug in ASP.NET MVC since version 5.2.4

https://github.com/aspnet/AspNetWebStack/issues/162

* Revert "Replacing System.Net.Http references with its NuGet package to pin the correct version number (experimental)"

This reverts commit 087f2849b1.

* Revert "Upgrading Microsoft.CodeDom.Providers.DotNetCompilerPlatform to 4.1.0 (latest) to get rid of old System.Http.Net dependency"

This reverts commit be2ba866e3.

* Reverting the addition of assembly binding redirects to Orchard.Specs/Hosting/Simple.Web/Web.config

since it doesn't need them like Orchard.Specs/Hosting/Orchard.Web/Web.config does

* Disabling Test and Spec execution for now

* Orchard.Framework: Making the System.Net.Http not-private to prevent an outdated version sticking around

* Orchard.Workflows: Adding assembly binding redirect for System.Net.Http to avoid Razor compilation warning

* Moving the System.Net.Http assembly redirect to Orchard.Web

* Specs: Fixing "I can create browse blog posts on several pages" Blog test's usage of "I should not see" and correcting the parameters too

because unlike "I should see", this is not a regex match, just contains

* Specs: Fixing "I can create browse blog posts on several pages" Blog test's flakyness due to timing

because the blog posts are created quickly after one another and the lack of millisecond-precision can cause
the blog posts to appear out of order of creation

* Specs: Media test simplified since the Orchard.Media feature is deprecated

* Adding step to the Compile workflow to upload the MSBuild binlog results

* Pinning the referenced version of System.Net.Http to 4.2.0.0 to prevent Razor compilation warning

System.Net.Http is known to have such problems across different framework versions ways of referencing it

The original warning is:
ASPNETCOMPILER : error : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: Orchard.Workflows, Version=1.10.3.0, Culture=neutral, PublicKeyToken=null. The dependencies are: System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly. [D:\a\Orchard\Orchard\src\Orchard.Web\Modules\Orchard.Workflows\Orchard.Workflows.csproj

* Re-enabling the Test step

* Re-enabling the Specs step

* Marking System.Net.Http references as private (copy local) to make sure that it's always available, because it requires a specific version

* Revert "Marking System.Net.Http references as private (copy local) to make sure that it's always available, because it requires a specific version"

This reverts commit e4f5632236.

* Orchard.Specs: Adding Settings feature

* Orchard.Specs: Updating DateTime.CreatingAndUsingDateTimeFieldsInAnotherCulture structure without functional change

* Orchard.Specs: Updating Settings.AddingANewSiteCultureAndSelectingItAsTheDefaultWorks to correctly detect that a culture that wasn't added before can be set as default

* Fixing outdated assembly binding redirects

* Fixing Newtonsoft.Json references

* Updating Newtonsoft.Json reference in Orchard.Messaging.Tests.csproj

* Disabling the Test step for now

* Adding System.Net.Http 4.2.0.0 reference to Orchard.Email's web.config to fix Razor compilation warning

* Re-enabling the Test step

* Fixing HqlExpressionTests.AllDataTypesCanBeQueried

* Fixing initialization error error in StylesheetBindingStrategyTests

* Fixing initialization errors in FeatureManagerTests

* Fixing Orchard.Tests.Localization.TextTests

* Code styling and fixing warning in Orchard.Tests/UI/Resources/ResourceManagerTests.cs

* Updating Orchard.Tests/UI/Resources/ResourceManagerTests.cs according to ResourceManager API change in ac11024be4

and removing obsolete tests

* Orchard.Tests.Modules: Adding missing reference to Iesi.Collections (that doesn't cause a build error, just when running tests)

* Fixing initialization errors in ModuleStepTest and ThemeStepTest

* Fixing initialization errors in ShellDescriptorManagerTests

* Fixing initialization errors in AccountControllerTests

* Fixing that MembershipServiceTests should use IPasswordService, also making SaltAndPasswordShouldBeDifferentEvenWithSameSourcePassword test parameters more readable

* Specs: Updating the Newtonsoft.Json binding redirect in the spec app's web.config

* Re-enabling the Spec step

* Upgrading actions to latest versions

These actions generated the Node.js 16  deprecation warning

* Removing SpecFlow test execution from the compile workflow

* Testing the branch strategy matrix concept to be used for the nightly build

* Revert "Testing the branch strategy matrix concept to be used for the nightly build"

This reverts commit 1354e367b7.

* Adding workflow to run specflow tests as a nightly build

* Updating Orchard.Tests.ContentManagement.HqlExpressionTests.ShouldSortRandomly to decrease failure chance due to randomness
2024-03-08 11:56:06 +01:00
Benedek Farkas
e333952b68 Merge branch 'issue/8684' into dev 2024-03-07 19:40:11 +01:00
Benedek Farkas
fcf960f7e3 Reworking the merge conflict resolution between 1.10.x and dev for the Core.Common and Projections migrations 2024-03-07 16:50:58 +01:00
Benedek Farkas
81b9a6050f Projections: Consolidating Migration Update steps into Create 2024-03-06 16:07:15 +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