Panel issues - custom user form fields

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
  )
));

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 :disappointed:.

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 :slight_smile:
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.

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.

Have you already tried to reinstall the Kirby and Panel folders?

Unfortunately, yes.
No luck.

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 :open_mouth:
Thanks for the tipp!

Glad we finally sorted this out :slight_smile:.

It’s best to always use small letters in all filenames, BTW.

Yes, a lesson I’ve learned the hard way.

Unfortunately, I completely overlooked that yesterday and then suddenly when I looked at your filename again, I just dawned on me :open_mouth: Sometimes, you just miss the obvious …