Port add PET form.

CommentFileSizeAuthor
#12 port_add_pet_form-2366839-12.patch1.63 KBsharique

Comments

smashwini’s picture

  • Sharique committed 06bd7b4 on 8.x-1.x
    Issue #2366839 : Add pet form - form save WIP
    
sharique’s picture

Assigned: smashwini » sharique
Status: Active » Needs work

On clicking save get error "[php5:error] [pid 13771] [client 127.0.0.1:43943] PHP Fatal error: Cannot unset string offsets in /home/drupal/Projects/d8/drupal/core/lib/Drupal/Core/Field/WidgetBase.php on line 346, referer: http://d8.local/admin/structure/pets/add"

sharique’s picture

  • Sharique committed dc8b44a on 8.x-1.x
    Issue #2366839, #2366841 - PET add/edit form - now working
    
sharique’s picture

To Do:
1. Machine name field is not working as desired.
2. Mime mail options should be not displayed as module is not preset, currently disabled.

sharique’s picture

Project: » Previewable email templates
Version: » 8.x-1.x-dev
rahul.shinde’s picture

Assigned: sharique » rahul.shinde
jamesliu78’s picture

Hi, I found the way to fix it, but too many place need to fix, so I just note it.

  1. class use extends BundleEntityFormBase
  2. "name" use type "machine_name"
  3. return $this->protectBundleIdElement($form);

It should be work, but need to type full form detail.

sharique’s picture

BundleEntityFormBase is for config entities and PET is content entity, so it does not work with that.

sharique’s picture

I'm thinking about not to show machine name field in the form for now. Let me know if anybody thinks other way.

sharique’s picture

Status: Needs work » Needs review
StatusFileSize
new1.63 KB

Here is patch to hide machine name field and auto populate its value from title.

  • Sharique committed 4e6df20 on 8.x-1.x
    Issue #2366839 by Sharique: Port add PET form
    
sharique’s picture

Assigned: rahul.shinde » Unassigned
Status: Needs review » Closed (fixed)

Created separate issue for machine name field #2696897: Remove machine name field