5667 Commits

Author SHA1 Message Date
Luke Towers
433d1bc7a0 Code tidying 2023-07-14 14:54:54 -06:00
Luke Towers
71fcf8eef9 Limit plugins loaded for CLI requests when database is configured but not initialized yet
Related: octobercms/october#3208. This issue surfaces when deployment tools attempt to run various commands not already protected (i.e. vapor:health-check) before running any migrations, which causes issues if plugins attempt to access the database during their registration or booting process.

In theory we could also apply this logic to HTTP requests, however it is generally easier to see and handle the reported exception of the table being missing in an HTTP context, so it's acceptable to limit this protection to the CLI.

As a reminder, plugins making use of the $elevated permissions are responsible for defensive measures to reliably operate in potentially unstable states of the application.
2023-07-14 14:51:00 -06:00
Luke Towers
4441fcfbd0 Minor code tidying 2023-07-14 14:45:41 -06:00
Luke Towers
8c0d2f4900 Fix exception when accessing a SettingsModel before the table exists
Related: octobercms/october#3208. This solves an issue when attempting to access any SettingsModel before initial migrations have been run but the database exists (which is all App::hasDatabase() looks for).
2023-07-14 14:45:01 -06:00
Ben Thomson
9df99dc74a Add GH action for manifest update 2023-07-11 09:31:34 +08:00
Luke Towers
57a9807cbd
Fix typo
Fixes wrong class removed in 589ea8523d
2023-07-07 14:14:54 -06:00
Luke Towers
589ea8523d
Remove background styles from recordfinder Clear button
See also af5f4c1d70
2023-07-07 14:14:19 -06:00
der_On
af5f4c1d70
Make Clear button in the recordfinder visible (#937)
Credit to @der-On
2023-07-07 14:13:19 -06:00
Luke Towers
fa50b4c748 Add support for uploading SVGs 2023-07-07 11:54:38 -06:00
Luke Towers
4f80b2bc6f
Make cms.beforeRoute a halting event
This change allows developers to prevent the CMS route from being registered.

An example use case for this is loading the CMS content under a set path prefix by re-registering the CMS route with the appropriate prefix in place. Preventing the registration of the default CMS route is required in order to override the mapping of the controller action to URL (and thus have the Cms::url() helper generate the correct URLs in this example). 

Example:
```php
Route::any('docs/{slug?}', 'Cms\Classes\CmsController@run')->where('slug', '(.*)?')->middleware('web');

Event::listen('cms.beforeRoute', function () {
    $path = Request::path();
    // Disable the CMS routes so that the docs/ route can take over for URL generation
    if (Str::startsWith($path, 'docs')) {
        return false;
    }
});
```
2023-07-06 20:46:40 -06:00
Luke Towers
0c4d27f4e6
Use a per-theme cache key for caching Theme asset URLs 2023-07-06 18:48:17 -06:00
Luke Towers
496a3e485a Finish implementing the create:migration command 2023-07-03 22:26:38 -06:00
Luke Towers
b7af5d300e Add support for getPlugin() helper on scaffolding commands implementing the HasPluginArgument trait 2023-07-03 22:25:57 -06:00
Luke Towers
643463943c Reuse getPluginVersions() in getPluginVersion() 2023-07-03 22:25:24 -06:00
Luke Towers
b6f147d16a Add support for --uninspiring flag on code generation commands 2023-07-03 22:24:50 -06:00
Luke Towers
f42b93de1d reorder imports 2023-07-03 20:17:46 -06:00
Luke Towers
40bfc57c3a Remove unnecessary imports 2023-07-03 20:16:45 -06:00
Luke Towers
e621f5938a Add getPluginVersions() to PluginBase 2023-07-03 20:15:52 -06:00
Luke Towers
d7afbf9414 Recompile mediamanager JS 2023-06-24 17:27:17 -04:00
Marc Jauvin
de9d22fded close parenthesis in log entry 2023-06-13 23:33:25 -04:00
Marc Jauvin
9632e62920
Avoid logging error erroneously (#923)
Fixes #922
2023-06-13 15:58:27 -06:00
Marc Jauvin
428d2bcad8
Add inputmode attribute to datepicker formwidget (#891)
Co-authored-by: Ben Thomson <git@alfreido.com>
Co-authored-by: Luke Towers <luke@luketowers.ca>
2023-06-11 19:55:38 +08:00
Ben Thomson
0cb5585b4d
Show migration messages even if an exception is thrown (#903)
Fixes #510
2023-06-11 19:54:09 +08:00
Alex Oroshchuk
71705de716
Fix race condition with maxItem limit check after adding a new repeater item (#919)
Introduce a delay to give the widget enough time to show the just added item before maxItem limit check is run.

Co-authored-by: Alexandr Orosciuc <alexandr.orosciuc@isoftbet.com>
Co-authored-by: Ben Thomson <git@alfreido.com>
2023-06-11 19:47:22 +08:00
Ben Thomson
02cbd8654a
Fix case sensitivity issue with determining "upload_max_filesize" size
Fixes https://github.com/wintercms/winter/issues/788
2023-06-11 19:43:09 +08:00
Luke Towers
ad427a621a Improve typehinting 2023-06-07 09:29:39 -06:00
Luke Towers
a3d01188fa Exclude ignored Mix packages from MixAssets->getPackages() 2023-06-07 09:29:27 -06:00
Luke Towers
cba5fa7562 Add support for selecting a theme's scaffold when generating through the backend
Also fixes #915.
2023-06-07 09:28:20 -06:00
Luke Towers
749e20e752 Add visual indicator to artisan mix:list when a given package is ignored. 2023-06-02 22:41:54 -06:00
Szabó Gergő
dce1e2dbcf
Improve responsive views (#913)
Credit to @gergo85.
2023-06-02 21:45:46 -06:00
Szabó Gergő
55728c7b9a
Improved Hungarian translation (#912) 2023-05-31 14:52:56 -06:00
Luke Towers
e026c372de Improve type hints 2023-05-30 17:59:58 -06:00
Marc Jauvin
af0f86675e
Allow scoped and local extensions on core controllers. (#908)
Complement wintercms/storm#134
2023-05-29 16:52:44 -06:00
djpa3k
deeb7e7097
Improved Slovak translations (#911) 2023-05-29 14:17:29 -06:00
Marc Jauvin
3341a47789
Provide the current Form instance to partials (#902)
Co-authored-by: Luke Towers <luke@luketowers.ca>. Documented by https://github.com/wintercms/docs/pull/130
2023-05-17 15:21:48 -06:00
Marc Jauvin
7adf773ee8
Support trigger actions for dropdown fields in preview mode (#905)
Fixes #905
2023-05-17 07:41:08 -06:00
Luke Towers
95619bf30a
Add missing .php from migration file name 2023-05-09 18:14:22 -06:00
Marc Jauvin
fc748326ef
Improve docs for checking for the correct Form widget instance (#899)
Co-authored-by: Luke Towers <luke@luketowers.ca>
2023-05-02 17:36:31 -06:00
Ben Thomson
d27dbbc5f8
Use temporary themesPath config for CMS tests
The override for the paths in the testing environment was causing plugin tests to fail as the base plugin test class was pointing to the wrong plugin root.

I've changed it so the override is now only applied for the test(s) that need it.

Refs: https://github.com/wintercms/wn-redirect-plugin/pull/15#issuecomment-1510038828
2023-04-30 20:38:01 +08:00
Jack Wilkinson
6fa840074a
Switch from using DIRECTORY_SEPARATOR to '/' (#898)
Fixes #895
2023-04-27 21:49:16 -06:00
Luke Towers
2148ab537a Fix ImageResizer test 2023-04-27 11:00:16 -06:00
Luke Towers
11ec68f60f Improve type hinting 2023-04-25 20:35:55 -06:00
Zach Schneider
fb80727501
Add sizeBytes & lastModified to mediamanager.js getItems() (#890)
This adds the sizeBytes & lastModified item attributes to the getItems() function in mediamanager.js exposing them for use in the onInsert() handler of the MediaManager popup.

Credit to @zaxbux
2023-04-23 08:53:49 -06:00
Ben Thomson
f92f3a3d17
Make "winter:util" artisan test clean up after itself 2023-04-22 22:16:05 +08:00
Jack Wilkinson
177d30b8a2
Add Mediafinder Modes (#780)
This PR introduces support for all mediamanager filters as modes for the mediafinder formwidget.

This means that the following mode values would be available:

image
file
document
audio
video
all (default)
2023-04-21 10:11:06 -06:00
AIC BV
7f79742732
Make date field bigger, time field smaller in "datetime" field (#887) 2023-04-20 07:29:38 +08:00
AIC BV
77ca808b11
Removed unnecessary traceLog call (#880) 2023-04-14 11:56:05 -06:00
Luke Towers
6d5388229f Add support for single symbolized assets to theme asset URL generation
Also added tests for symbolized assets passed to the asset combiner from the themeUrl() method.
2023-04-11 12:28:44 -06:00
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
Ben Thomson
dfd2ec26e2
Convert Snowboard extras to classes
Follows on from 56b7a8f47f, for the same reason.
2023-04-06 15:37:52 +08:00