Commit Graph

11208 Commits

Author SHA1 Message Date
Benedek Farkas
731b223f82 8686: Fixing build and tests on 1.10.x (#8687)
* 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 Newtonsoft.Json references

* Specs: Workaround for the DefineDefaultCulture binding and removing the Settings feature which is now redundant with CreatingAndUsingDateTimeFieldsInAnotherCulture

* Updating the compile workflow to run the build + tests on PR, dev and 1.10.x commits

* Adding the compile workflow to the solution
2023-06-28 15:11:46 +02:00
Andrea Piovanelli
bf0c71c4f0 Added lock on md5 variable to avoid concurrent hash generations for feature list. (#8697) 2023-06-19 10:04:24 +02:00
Matteo Piovanelli
9122abbdec Added missing module dependency (#8694)
610b3c4f53/src/Orchard.Web/Modules/Orchard.Recipes/Providers/Executors/ModuleStep.cs (L14)

if feature PackagingServices is not enabled, `ModuleStep` cannot be constructed by Autofac, causing several things to fail (e.g. import/export).
2023-05-26 09:16:57 +02:00
Matteo Piovanelli
a215e606b7 Added dictionaries to memorize results of queries and avoid repeating them (#8690)
within a request.
2023-05-26 09:16:04 +02:00
Matteo Piovanelli
e55dbb0db8 Changed Loader and Setter delegates of the LazyFields of LocalizationPart to (#8693)
use Store/Retrieve implementations rather than go directly to the Record.
2023-05-26 09:12:14 +02:00
Benedek Farkas
610b3c4f53 Fixing warning in Orchard.MediaLibrary/Views/ClientStorage/Index.cshtml (LimitConcurrentUploads is a non-nullable int) 2023-05-17 18:33:02 +02:00
Hermes Sbicego
05e3c196aa Feature/tinymce contentlinks plugin (#8679)
* Adds the ability to create links based on orchard contents, calculating href during the display process using tokens

# Conflicts:
#	src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js

* Adds Contentmanager.Get Tokens
Adds Content Links plugin to TinyMCE

* Adds settings for TextField and BodyPart in order to specify which content types or part to show in the list

* Settings for Html editors built on BodyParts, TextFields, LayoutParts

* Adds minified version of the plugin.js

* Tests if dependencies are enabled before activating the content links settings

* new .png for TinyMce

* Renamed the token as suggested during last meeting
2023-05-08 09:07:05 +02:00
Matteo Piovanelli
12e9f06689 Perf: shapetable sorting (#8676)
* Grouped ShapeAlteration by feature before sorting them

* removed stopwatches

* Sorting approach can be selected by setting the GroupByFeatures option in HostComponents.config
2023-05-05 09:43:02 +02:00
Matteo Piovanelli
bf8cc13922 Perf: ExtensionManager (#8677)
* WIP extension manager allowing serial loading of features

* Proper comments in HostComponents.config. Removed test/dev logs in ExtensionManager.
2023-05-05 08:56:22 +02:00
Matteo Piovanelli
ff2f222695 added orchardFeature attribute where it was missing in Orchard.Roles (#8680) 2023-05-05 08:49:25 +02:00
Hermes Sbicego
6283106c53 Adds the ability to insert/edit snippets of html source code (#8668)
* adds a new tinyMCE plugin enabling editing a piece of html source code

* - Adds the new plugin to the VS project
- Adds js minified version
2023-04-28 08:52:46 +02:00
Andrea Piovanelli
55ec9e2335 No term selection option in TaxonomyField (#8667)
* Added no term selection option when taxonomy field is not required and is set to be shown as a radio button set (single choice without autocomplete)

* Correctly checked the "no selection" option when SingleTermId == 0.
2023-04-21 08:53:55 +02:00
Andrea Piovanelli
10e5078956 Corrected RoleEvent actions to match activity outcomes (RoleRenamed -> Renamed, RoleCreated -> Created, RoleRemoved -> Removed) (#8659) 2023-03-31 09:43:29 +02:00
Alessandro Agostini
d5acf2dc41 Email confirmation fail on multiple confirmation attempts (#8656)
If an user already confirmed his email address and tries to confirm it again it should fail.
2023-03-17 09:12:18 +01:00
Andrea Piovanelli
7ac17272d2 If MenuPart is a ContentMenuItem, check if the content is published before adding it to the NavigationBuilder. (#8653) 2023-03-17 09:11:09 +01:00
Andrea Piovanelli
9728831556 8657 roleactivities: adds role event activities and handlers for workflows (#8658)
* Added Role Event Activities and Handlers for workflows.

* Removed and sorted using

* Added user as the Content parameter for worflow triggers when possible (UserAdded and UserRemoved role events).
2023-03-17 08:59:24 +01:00
Andrea Piovanelli
babe1d665d Added sequential upload parameter to fileupload() parameters when importing media (#8650)
* Added sequential upload parameter to fileupload() parameters when importing media.

* Added setting to limit concurrent uploads
2023-02-27 08:43:53 +01:00
Alessandro Agostini
7bf78ef852 check the culture is supported (#8646)
* check the culture is supported

* changed == to equals
2023-01-20 12:12:24 +01:00
Andrea Piovanelli
eed4a6a11b Checked page parameter to ensure a integer numeric value is provided. (#8644) 2023-01-13 09:00:54 +01:00
Alessandro Agostini
2a1b0b3af3 Added hints to show technical names in list of content types and content field definition edit (#8640)
* Added hint in EditField view

* Added hint to EditTypeViewModel.cshtml to show technical name in list of content types

* fixed typo

* Clarified hint displaying technical name.

Co-authored-by: Andrea Piovanelli <andrea.piovanelli@laser-group.com>
2022-12-06 09:26:34 +01:00
Matteo Piovanelli
f76f7bd428 Updated SharpZipLib to 1.3.3 (#8633) 2022-10-20 10:07:50 -07:00
Alessandro Agostini
ba5873aece Fix for issue 8631: field values are reset when imported (#8632)
* If there is nothing to import for MediaLibraryPickerField and ContentPickerField, the field doesn't need to be reset.

* Checked the presence of the field inside the import context to avoid resetting the field value even if the field isn't imported.
This applies to ContentPickerField, MediaLibraryPickerField and NumericField.
2022-10-14 08:57:44 +02:00
Matteo Piovanelli
8f73299406 Added cachekey parameter to discriminate between ajax and "normal" calls (#8630) 2022-10-14 08:55:52 +02:00
Matteo Piovanelli
a402c82c23 Bump version for owin packages. (#8617)
* Bump version for owin packages.

* restored project settings that had been altered when updating packages
2022-09-19 08:41:21 +02:00
Andrea Piovanelli
ddc56c8baa Moved logic for max file path length in file storage provider (#8603)
Co-authored-by: matteo.piovanelli <matteo.piovanelli@laser-group.com>
2022-09-05 09:01:30 +02:00
Andrea Piovanelli
343ceb777b 8599 nullable field values (#8600)
* Added nullable type to DescribeMemberContext for BooleanField and NumericField.

* Rollback of nullable member value for NumericFieldDriver, which is unnecessary because Editor function doesn't let a null value to be saved.
2022-07-15 08:38:03 +02:00
Andrea Piovanelli
c38e6814a9 Feature/blogposts search (#8570) 2022-07-08 16:51:07 +02:00
Hermes Sbicego
d0bd8d0af0 Create unique HTML element ids for boolean fields edited via radio buttons (#8598) 2022-07-08 16:49:56 +02:00
Andrea Piovanelli
9f37c23dd7 allow RecipeManager to affect execution timeout (#8572)
Co-authored-by: matteo.piovanelli <matteo.piovanelli@laser-group.com>
2022-06-17 08:51:25 +02:00
Andrea Piovanelli
f161693d52 Moved ShapeTracing js includes at head (#8560) 2022-06-17 08:50:56 +02:00
ElenaRepository
0973810c09 added the missing minification files (#8553)
Co-authored-by: elena.lampugnani <elena.lampugnani@laser-group.com>
2022-04-01 14:15:49 +02:00
Matteo Piovanelli
c0fa82fcf9 Handlers to redirect creating and editing users to the correct controller (#8549) 2022-04-01 14:15:04 +02:00
Matteo Piovanelli
a5f657540a Fixed bug with medialibrary plugin where I had forgotten to replace an instance (#8547)
of the previous way to compute the admin url
2022-04-01 14:14:49 +02:00
Andrea Piovanelli
863d4a92a6 Layout elements cloning (#8538)
* Created a new element when session widget has a different container than the widget in the import context (to ensure actual cloning of the elements and not just adding a reference to the old element from the original container).

* Some comment has been rewritten for clarity
2022-03-18 12:27:11 +01:00
ElenaRepository
ab7c0f242e checked null part (#8543)
Co-authored-by: elena.lampugnani <elena.lampugnani@laser-group.com>
2022-03-18 12:26:49 +01:00
Matteo Piovanelli
5b0c82d1ad Added specific permission to change owner of content item (#8539) 2022-03-18 12:26:06 +01:00
Matteo Piovanelli
ebfd03df0e Use a variable with an actual path to a base url to find the actual path to (#8546)
the medialibrary
2022-03-17 10:06:46 -07:00
Andrea Piovanelli
88a79cb768 Added LayoutSaving call to context in WidgetElementHarvester to properly update the container of widgets. (#8534) 2022-02-09 10:20:30 +01:00
Matteo Piovanelli
ea3c7d89b1 Added descriptor to audit trail context (#8517) 2021-12-10 08:31:16 +01:00
Andrea Piovanelli
987291c3cf Fixed various typos: (#8512) 2021-10-29 08:39:38 +02:00
Andrea Piovanelli
a8de3afc0f Fix/editmenulink (#8515)
* Removed useless spaces

* Corrections on ProjectionPart query link (it didn't update the link when changing the selected query).
Added edit link for menu in MenuWidget.

* Added menuId parameter to menu edit link
2021-10-25 09:19:50 +02:00
Matteo Piovanelli
e771a56c42 Added null checks (#8511)
The added null checks manage properly importing definitions that do not contain the properties.
2021-09-24 08:37:25 +02:00
Hermes Sbicego
d51418b2c1 Sets SSL redirection as permanent for SEO reasons (#8503)
Fixes #8502
2021-09-16 10:03:00 -07:00
Andrea Piovanelli
e447561cfe HtmlDecode token (#8501)
Added HtmlDecode token management.
Needed for #8500
2021-09-10 08:52:11 +02:00
Hermes Sbicego
4e69612d90 Projection default settings (#8497)
* added settings in projection part
* read settings into driver
* commit files setting
* add logic of filter query
* added logic of filter query setting
* managed import/export
* fixed migration
* added message information
Co-authored-by: elena.lampugnani <elena.lampugnani@laser-group.com>
2021-09-03 09:03:27 +02:00
Matteo Piovanelli
b00678abf4 Force enumeration of list of permissions.
Without this, imported permissions (#8492) would always replace existing ones: i.e. if an existing permission is not in
the list being imported it would be removed for the role.
2021-09-03 09:01:01 +02:00
Matteo Piovanelli
08597931e6 Remove whitespace when importing list of permissions (#8499)
Similarly to what's already being done when we import features.
this allows to go to a new line in the xml that we import, and even tabulate for readability and maintenance.
2021-09-03 08:58:01 +02:00
Matteo Piovanelli
d2e535fbc8 Revert "Cloning doesn't overwrite identity (#8487)" (#8495)
This reverts commit af42947c9c.
2021-08-05 17:52:13 +02:00
Matteo Piovanelli
074a0b140d Fixes disposed LifetimeScope issue (#8490)
* fixed scope in in recomputing the context to figure out whether an antiforgery token needs replacing
2021-07-30 08:42:13 +02:00
Matteo Piovanelli
b37256fc94 Update nhibernate (#8488)
* Update nHibernate to version 4.1.2.4000

# Conflicts:
#	src/Orchard.Web/Modules/Orchard.ContentPicker/packages.config
#	src/Orchard.Web/Modules/Orchard.ImportExport/packages.config
#	src/Orchard.Web/Modules/Orchard.MessageBus/packages.config
#	src/Orchard.Web/Modules/Orchard.MultiTenancy/packages.config
#	src/Orchard.Web/Modules/Orchard.Projections/packages.config
#	src/Orchard.Web/Modules/Orchard.Tags/packages.config
#	src/Orchard.Web/Modules/Upgrade/packages.config
#	src/Orchard.Web/Web.config

* Update AssemblyBindings for NHibernate
2021-07-30 08:41:53 +02:00