On our local development environment this feature works as expected. However on our production server the panel doesn’t show the custom form fields defined in the blueprint just after its creation.
Do you have any idea on why these issues occur and how we can fix them?
Thanks,
Marco
Is the production server on the same version of Kirby? Custom user fields were added in 2.2.3.
If an outdated Kirby version is not the issue, then let us know which version of Kirby is installed on your remote server and pls. post your user blueprint for testing.
Yes, we have the same version of Kirby in local development and production: 2.3.2
This is our blueprint:
site/blueprints/users/videoArchiveMember.php
fields:
profileTypes:
label:
it: Tipologia Profilo
en: Profile Type
type: headline
limitedProfileToggle:
label:
it: Vuoi attivare il profilo limitato?
en: Do you want to activate the limited profile?
type: toggle
text: yes/no
default: yes
limitSettings:
label:
it: Settaggi Limiti
en: Limits Settings
type: headline
limitSettingsInfo:
label: Info
type: info
text: >
I seguenti settaggi hanno effetto solo se è stato selezionato un profilo limitato.
temporaryLimitToggle:
label:
it: Vuoi attivare il limite temporale?
en: Do you want to activate the temporary limit?
type: toggle
text: yes/no
default: yes
startDateTime:
label:
en: Data Inizio
it: Start Date
type: datetime
date:
format: DD-MM-YYYY
time:
format: 24
interval: 15
required: true
width: 1/2
endDateTime:
label:
en: Data Fine
it: End Date
type: datetime
date:
format: DD-MM-YYYY
time:
format: 24
interval: 15
required: true
width: 1/2
line:
type: line
playlistLimitToggle:
label:
it: Vuoi attivare il limite tematico?
en: Do you want to activate the thematic limit?
type: toggle
text: yes/no
playlists:
label:
it: Playlist
en: Playlists
type: structure
entry: >
{{playlist}}
fields:
playlist:
label: Playlist
type: select
options: query
query:
page: membership/video-playlist
value: '{{title}}'
text: '{{title}}'
flip: true
site/config/config.php
c::set('roles', array(
array(
'id' => 'admin',
'name' => 'Admin',
'default' => true,
'panel' => true
),
array(
'id' => 'editor',
'name' => 'Editor',
'panel' => true
),
array(
'id' => 'videoArchiveMember',
'name' => 'Membro Archivio Video',
'panel' => false
)
));
texnixe
October 13, 2016, 12:12pm
5
Is that a yml or a php file?
Outch. It’s a php file.
However, after changing it to yml, the result is the same.
I had hoped that would make a difference .
Just to recap: If you create a new user, the custom fields don’t show up as expected. But the custom fields are shown for existing users so that the user file is in fact read?
Not exactly
The custom fields works as expected in local development. In production – for both old and new users – the custom fields don’t show up at all.
Do you get any PHP errors in your error log?
What about permissions? Is the file readable by the webserver?
Permissions seems to be the problem.
When a new user is created, they’re set to 644.
If I change the new user’s permissions to something more relaxed (even 777, just for test purpose) and i click “Save” again, nothing change.
texnixe
October 14, 2016, 9:58am
11
I actually meant the blueprint file.
But honestly, apart from that, I have no idea what’s going on here. The rest of the panel works as expected, I guess?
Yes, the file is readable and everything else works fine.
texnixe
October 14, 2016, 10:05am
13
Have you already tried to reinstall the Kirby and Panel folders?
Unfortunately, yes.
No luck.
texnixe
October 14, 2016, 10:12am
15
Last Idea:
Change the filename to small letters only and the user role as well.
2 Likes
Now it’s working correctly! I’m speechless
Thanks for the tipp!
texnixe
October 14, 2016, 10:23am
17
Glad we finally sorted this out .
It’s best to always use small letters in all filenames, BTW.
Yes, a lesson I’ve learned the hard way.
texnixe
October 14, 2016, 10:29am
19
Unfortunately, I completely overlooked that yesterday and then suddenly when I looked at your filename again, I just dawned on me Sometimes, you just miss the obvious …