1480 Commits

Author SHA1 Message Date
Luke Towers
b22dbdedf2
Ignore assets using path symbols
This excludes assets using path symbols from the child -> parent theme path resolution logic.

Fixes #884.
2023-04-11 10:59:07 -06:00
Jack Wilkinson
9294d39cc4
Multiple assets in combiner url (#875) 2023-03-29 08:06:30 +08:00
xitara
6954797be2
Add 'themes.' prefix to let work backend theme localization again (#861) 2023-03-06 07:24:30 -06:00
xitara
5d07e6523c
Fix Class "Cms\Classes\Log" not found error (#858) 2023-03-05 20:26:23 +08:00
Jack Wilkinson
5b4e977b07
Fix typehint (#856) 2023-03-02 09:20:10 -06:00
Luke Towers
1adb3abbff
Merge pull request #726 from wintercms/wip/child-theme 2023-03-01 07:42:14 -06:00
Jack Wilkinson
af37464ea3 Added child theme tests 2023-03-01 11:53:36 +00:00
Damien MATHIEU
e5f951a43a
Include theme Blocks in the Tailwind theme scaffold (#850) 2023-02-28 17:38:38 -06:00
WebVPF
b1d28d9d3e
Improved Russian translations (#847) 2023-02-28 20:32:57 +08:00
Jack Wilkinson
263a1a3c00 Removed undefined var and replaced with halycon registered event 2023-02-27 18:43:02 +00:00
Luke Towers
c91fe4ff5c
Apply suggestions from code review 2023-02-27 12:25:38 -06:00
Jack Wilkinson
3febe416fe Merge branch 'develop' into wip/child-theme 2023-02-27 17:53:17 +00:00
Luke Towers
a9e2e01fb6
Update modules/cms/classes/Theme.php 2023-02-27 11:52:48 -06:00
Luke Towers
85fe239da0
Update modules/cms/widgets/AssetList.php 2023-02-27 11:35:33 -06:00
Luke Towers
3c393b74c1
Update modules/cms/classes/Controller.php 2023-02-27 11:32:50 -06:00
Luke Towers
02319de0ed
Update modules/cms/classes/Controller.php 2023-02-27 11:28:15 -06:00
Luke Towers
ad3e19eeeb
Update modules/cms/classes/Controller.php 2023-02-27 11:26:40 -06:00
Jack Wilkinson
49d7ea0801 Removed whitespace 2023-02-27 17:19:53 +00:00
Jack Wilkinson
1a8fb449a9 Added Carbon cache timer 2023-02-27 14:34:43 +00:00
Jack Wilkinson
5414c6256a Added support to the theme filter to validate parent theme for assets 2023-02-24 17:33:47 +00:00
Luke Towers
c95c950d19 Pass the active theme code to the cms.theme.getActiveTheme event
Required for Winter.Blocks datasource registration and generally a good idea.
2023-02-17 13:13:12 -06:00
Arvis Lācis
ff3ee998c9
Updated and improved Latvian translations (#828) 2023-01-30 09:05:20 +08:00
Luke Towers
fe5f754566 Merge branch 'develop' into wip/child-theme-autodatasource-caching
* develop:
  Fix issue with autoloading modules (#792)
  Add support for icon picker (#725)
  Classloader improvements (#779)
  Update Markdown content test
  Improved Ukrainian translation (#766)
  Add AJAX form validation to Snowboard (#777)
  Improve theme scaffolding (#778)
2022-12-08 14:42:29 -06:00
Jack Wilkinson
5540dadaaf Added fix to allow nested AutoDatasource instances to manage their own populateCache 2022-12-08 18:08:59 +00:00
Luke Towers
0aed0b4b02
Classloader improvements (#779)
See wintercms/storm#72
2022-11-29 21:06:46 -06:00
Ben Thomson
596f8cc98d Update Markdown content test
The CommonMark implementation of Markdown specifies that a newline should follow block-level elements
2022-11-30 10:39:19 +08:00
Matteo Trubini
9b2282b280
Improve theme scaffolding (#778)
If gtag() is undefined an error is raised.
2022-11-27 18:59:32 -06:00
Luke Towers
4f0da6cd0c
Set the AutoDatasource's cache key based on the current theme 2022-11-23 23:13:29 -06:00
Luke Towers
3d77c7a03a
Add ability to specify the cache key of the AutoDatasource 2022-11-23 23:12:50 -06:00
Luke Towers
9b035c20e9 Merge branch 'develop' into wip/child-theme
* develop:
  Fix AuthManager tests
2022-11-23 11:12:13 -06:00
Luke Towers
554dd0e726 Fix AuthManager tests 2022-11-23 11:12:00 -06:00
Luke Towers
7a215c7baa Merge branch 'develop' into wip/child-theme
* develop:
  Improved Russian translation (#767)
  Remove empty widget width option (#772)
  Fix overlooked reference to App facade instead of local instance
  Use local app instance rather than facade
  Don't register backend permissions in the testing suite
  Type hinting and style tweaks
  Use the model instance returned by getRelationModel directly rather than as a static class reference
  Clone the form model before passing it to the RelationController

# Conflicts:
#	modules/cms/ServiceProvider.php
2022-11-23 10:35:54 -06:00
Luke Towers
1d8af5964c Fix overlooked reference to App facade instead of local instance 2022-11-21 15:44:45 -06:00
Luke Towers
f2447bb136 Use local app instance rather than facade 2022-11-21 15:40:39 -06:00
Luke Towers
5be4454c44 Don't register backend permissions in the testing suite 2022-11-21 15:34:18 -06:00
Luke Towers
6c90ba81ef Merge branch 'develop' into wip/child-theme
* develop:
  Ensure backend permissions are always registered
2022-11-17 15:20:18 -06:00
Luke Towers
46bf2dcc56 Ensure backend permissions are always registered
Backend user permissions are occasionally checked in the frontend, see the Post component of the Winter.Blog plugin.
2022-11-17 15:18:15 -06:00
Luke Towers
94d4e197b0 Merge branch 'develop' into wip/child-theme
* develop:
  Prevent fancy layout styling from spilling over into nested forms (#763)
  Allow Snowboard event listeners to be closures
  CMS Twig extension `contentFunction()` should return bool like `partialFunction()` (#746)
  prevent previous relations from being unlinked (#765)
  Allow cms.restrictBaseDir to be controlled via env variable
2022-11-15 10:41:09 -06:00
Luke Towers
8cf656d3be Improve performance of active theme resolution, add type hinting
This builds on the work originally done in https://github.com/octobercms/october/pull/3220 to further improve performance, especially in cases where lots of themes are present to choose from or "virtual" themes are being utilized.

Previously every single request would iterate over and initialize every single theme which involved booting an autodatasource for each theme and loading the entire contents of the path cache for each datasource of each theme into memory.

This commit changes the logic so that the cms.theme.getActiveTheme event will be run first, falling back to asking the cache service, then falling back to the DB if present, and finally defaulting to the value set in the configuration. After it has resolved an active theme it will attempt to cache that resolution permanently which should be fine since changing the active theme in the DB would trigger a cache invalidation when done through the setActiveTheme() method and changing the active theme in the file configuration would trigger a cache invalidation as well.
2022-11-15 00:36:07 -06:00
Marc Jauvin
baea29b142
CMS Twig extension contentFunction() should return bool like partialFunction() (#746)
This allows people to use the `content` function as a conditional to add fallback content if a given content file does not exist.
2022-11-14 13:47:56 +08:00
Luke Towers
fa35ede647 Merge branch 'develop' into wip/child-theme
* develop:
  Allow Snowboard debugging to be controlled independently
  Show required indicators on checkbox fields (#754)
  Allow component assets to be mirrored by "winter:mirror" command
2022-11-08 20:26:12 -06:00
Ben Thomson
8f2d2c7f53 Allow Snowboard debugging to be controlled independently
Adds the "develop.debugSnowboard" config option to enable to disable Snowboard debugging, overriding the default behaviour in following the app debug mode.
2022-11-09 09:59:07 +08:00
Jack Wilkinson
8ecf401a48 Moved backend localzation into theme activation to allow support for loading on theme activation instead of during service provider registration 2022-11-03 15:51:05 +00:00
Jack Wilkinson
f3efa93c64 Merge branch 'develop' into wip/child-theme 2022-10-28 16:04:49 +01:00
Jack Wilkinson
5617dbd338
Added fix to prevent path duplication (#745) 2022-10-28 09:02:34 -06:00
Luke Towers
8a64b1ed48
Include parent theme in twig caching path 2022-10-26 15:40:56 -06:00
Luke Towers
6673c15cbf Merge branch 'develop' into wip/child-theme
* develop:
  Fix base path for FrameworkNode
2022-10-26 10:58:55 -06:00
Luke Towers
41cfc8df8f
Fix base path for FrameworkNode 2022-10-26 10:57:57 -06:00
Luke Towers
9dae8513d1 Merge branch 'develop' into wip/child-theme
* develop:
  Add missing import
2022-10-26 10:46:04 -06:00
Luke Towers
435179061f
Add missing import 2022-10-26 10:45:37 -06:00