I have tried to set different title instead of "Basics" but it still shows up as "Basics" in node page. Is this a bug?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

toadyc’s picture

Same thing happens to me

nevets’s picture

Problem is because cck_fieldgroup_tabs_nodeapi() does not use per content type tab titles. I changed line 178 so it reads

          $title = t(variable_get('cck_fieldset_tabs_residual_title_'.$node->type, variable_get('cck_fieldset_tabs_residual_title', t('Basics'))));

and it seems to work correctly.

nicholas.alipaz’s picture

Doesn't seem to fix it for me, but 178 didn't really seem like the right line from what I could tell. Could you check your alteration and let me know what the lines around that altered line read?

nicholas.alipaz’s picture

OK, figured it out after looking a bit more...

Find:
$title = t(variable_get('cck_fieldset_tabs_residual_title', t('Basics')));

Change to:
$title = t(variable_get('cck_fieldset_tabs_residual_title_'.$node->type, variable_get('cck_fieldset_tabs_residual_title', t('Basics'))));

Thanks, I can confirm this fixes the issue for me.

greg.harvey’s picture

Status: Active » Needs review
FileSize
773 bytes

Patch attached.

chaloalvarezj’s picture

Just to confirm that the patch works perfectly! Thank you!

jcmarco’s picture

Confirmed that it works fine.
Thank you.

greg.harvey’s picture

Status: Needs review » Reviewed & tested by the community

Ok, reviewed and tested. =)
Hopefully someone will commit it soon.

nedjo’s picture

Thanks for the bug report. greg.harvey, I've assigned you CVS access, please go ahead and apply this to HEAD.

nedjo’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, applied.

greg.harvey’s picture

Hi - thanks for the CVS access - unfortunately I'm on vacation so was not able to apply the patch. See you've done it now anyway. Thanks! =)

Status: Fixed » Closed (fixed)

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

redraven’s picture

Status: Closed (fixed) » Active

In the most recent release this appears to be only fixed for the 'edit' view of the tabs. In this case 'Basics' is replaced by the defined over-ride for the default 'Basics' name in the module config page.

When just viewing the full node, the tab still defaults to 'basic' and the change made in the module config page is not reflected in the tabs, and 'basic still appears.

Miria’s picture

Yes the problem still exists in the node view, which is very important because this is what displays to everyone. Anyone know how to fix this?

greg.harvey’s picture

Status: Active » Closed (fixed)

There has not been an official release since this was fixed. Are you using 6.x-1.0 or 6.x-dev? This is only fixed in 6.x-dev so far. It *will* be fixed in 6.x-1.1.

If you say it's not fixed in the dev snapshot, then please re-activate the issue - otherwise leave it closed and use 6.x-dev (or wait for 6.x-1.1).

mrlava’s picture

I am using 6.x-dev and the view page tab shows 'Basics' regardless of what I set it to in admin/settings/cck-fieldgroup-tabs

mrlava’s picture

Status: Closed (fixed) » Active

neither the dev or the recommended is displaying the correct information in the node view

jaymallison’s picture

a quick fix for this (the title being wrong on the node view) is to add the following to the cck_fieldgroup_tabs_admin_settings() function.

  $form['cck_fieldset_titles']['cck_fieldset_tabs_residual_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Default'),
    '#default_value' => variable_get('cck_fieldset_tabs_residual_title', t('Basics')),
  );

This will set it site wide to something else. The code needs to be reworked a couple different ways to change it per content type. I only have one, so this worked for me.

greg.harvey’s picture

Status: Active » Reviewed & tested by the community

@jaymallison #5 already contains a patch that *does* allow different titles per content type. No need to write more code.

Setting back to reviewed and tested, so the patch can be re-applied. Not sure how the changes got lost.

serenecloud’s picture

My patch for this issue - same as #2 - only rolled as a patch.

freatida’s picture

I've applied the patch but node view is still showing Basics title.
Does this work for anyone?

greg.harvey’s picture

Yes, it works for me and several others (see comments 6, 7 & 8).

Sutharsan’s picture

Patch #20 works. RTBC +1
It looks like a plain bug, $node_type does not exist in cck_fieldgroup_tabs_nodeapi().

nedjo’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, fixed.

Status: Fixed » Closed (fixed)

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