If you have no Body field on a node type (via blanking out the Body field title in the core Drupal node form settings), then nodeformsettings module should not act on any of its Body field settings. The issue I ran into was with using nodeformsettings with Better Formats module. The nodeformsettings module will add settings to $form['body_field'] even if prior to that point in the nodeformsettings_form_alter() function the value of $form['body_field'] is NULL as is the case when no Body field is defined. Better Formats module then does its own thing on it's own form_alter hook that sees values in $form['body_field'] and does further work on the formats fieldset of the Body field. Except in this case, the Body field is actually not defined so Better Formats should rightly see a NULL for $form['body_field']. Patch is attached.

Comments

lelizondo’s picture

I'll check this out. Thanks

skylord’s picture

Have the same issue! Patch works OK - thank you a lot!

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new2.48 KB

I suggest:

  • Indenting the code within the IF block, to help compliance with the Drupal coding standards.
  • Adding a comment to help others understand the change.

Try this.

damienmckenna’s picture

Status: Reviewed & tested by the community » Needs review

Needs a review.

jaydub’s picture

It's been awhile but if I recall correctly the formatting issues are actually a problem with the module code in general. My patch was only to address the bug, leaving another patch to bring the whole of the module up to coding standards. Would like to hear from the module maintainer on that one....

skizzo’s picture

subscribing

lelizondo’s picture

Can you please tell me exactly what is it that is breaking with patch in #3?

giorgosk’s picture

StatusFileSize
new965 bytes

I was hoping for patch to help with "INPUT FORMAT" for body appearing even when BODY is not present
(as was described in the original post)

tried patch from #3 which is exactly like #1 but with uneccessary ---
after applying I recreated the patch with netbeans and it gave me the sorter version which I am attaching

lelizondo’s picture

@GiorgosK I can't open the file. It redirects me to the D.o frontpage, can you please resubmit maybe without the # sign in the filename

giorgosk’s picture

StatusFileSize
new965 bytes

yes you are right

But note I don't think it works as expected (it did not work for me)
and its basically the same patch as previous 2 patches

lelizondo’s picture

Status: Needs review » Fixed

Fixed. Thanks.

lelizondo’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Fixed in 6.x-2.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.