File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 3939 'command ' => function ($ command = null ) {
4040 // resolve queries
4141 $ command = \Bnomei \Janitor::query ($ command , $ this ->model ());
42+
43+ // Temporary fix for https://github.com/getkirby/kirby/issues/4955
44+ $ uuid = $ this ->model ()->content ()->uuid ()?->toString();
45+
4246 // append model
4347 if ($ this ->model () instanceof \Kirby \Cms \Page) {
44- $ command .= ' --page ' . $ this ->model ()->uuid ()?->toString() ?? $ this ->model ()->id ();
48+ $ uuid = !empty ($ uuid ) ? 'page:// ' . $ uuid : null ;
49+ $ command .= ' --page ' . $ uuid ?? $ this ->model ()->id ();
4550 } elseif ($ this ->model () instanceof \Kirby \Cms \File) {
46- $ command .= ' --file ' . $ this ->model ()->uuid ()?->toString() ?? $ this ->model ()->id ();
51+ $ uuid = !empty ($ uuid ) ? 'file:// ' . $ uuid : null ;
52+ $ command .= ' --file ' . $ uuid ?? $ this ->model ()->id ();
4753 } elseif ($ this ->model () instanceof \Kirby \Cms \User) {
48- $ command .= ' --user ' . $ this ->model ()->uuid ()?->toString() ?? $ this ->model ()->id ();
54+ $ uuid = !empty ($ uuid ) ? 'user:// ' . $ uuid : null ;
55+ $ command .= ' --user ' . $ uuid ?? $ this ->model ()->id ();
4956 } elseif ($ this ->model () instanceof \Kirby \Cms \Site) {
5057 $ command .= ' --site ' ; // boolean argument
5158 }
52- $ command .= ' --model ' . $ this -> model ()-> uuid ()?->toString() ??
59+ $ command .= ' --model ' . $ uuid ??
5360 ($ this ->model () instanceof \Kirby \Cms \Site ? 'site:// ' : $ this ->model ()->id ());
5461
5562 $ command .= ' --quiet ' ; // no STDOUT on frontend PHP
You can’t perform that action at this time.
0 commit comments