knuckleswtf / knuckleswtf/scribe
theme 'elements' doesn't display properly
- Dominant language
- PHP
- Stars
- 2.3k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
### Scribe version
4.28.0
### PHP version
8.1
### Framework
Laravel
### Framework version
10.37.3
### Scribe config
```ruby
when running the diff command, I got the following error:
ErrorException
Array to string conversion
at vendor/knuckleswtf/scribe/src/Tools/ConfigDiffer.php:62
58▕ if (!is_array($oldValue)) {
59▕ return "changed to a list";
60▕ }
61▕
➜ 62▕ $added = array_map(fn ($v) => "$v", array_diff($value, $oldValue));
63▕ $removed = array_map(fn ($v) => "$v", array_diff($oldValue, $value));
64▕
65▕ $diff = [];
66▕ if (!empty($added)) {
+17 vendor frames
18 artisan:37
```.
I changed the following lines in `config/scribe.php`:
'type' => 'laravel',
'theme' => 'elements',
'docs_url' => '/apidocs',
'order' => [
'User Auth',
'Slips'
],
```
### What happened?
when using the 'elements' theme, the pages are generated and displayed incorrectly. but if I switched back to the 'default' the pages look fine. Please see the attached screenshots: the 1st is taken from 'elements', and the 2nd is taken from 'default'


### Docs
- [X] I've checked [the docs](https://scribe.knuckles.wtf/laravel), the [troubleshooting guide](https://scribe.knuckles.wtf/laravel/troubleshooting), and [existing issues](https://github.com/knuckleswtf/scribe/issues?q=is%3Aissue+), but I didn't find a solution
Contributor guide
Research direction
Reproduce the issue with the listed Scribe, PHP, and Laravel versions and the shown config, then inspect vendor/knuckleswtf/scribe/src/Tools/ConfigDiffer.php around line 62 and the Elements theme output. Compare generated Elements pages with the default theme and verify that the diff command completes without the reported conversion error and the generated pages display correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100