Hello Community,

I am having a problem that Add, Edit, View admin tabs not showing when on a particular content item.

While when we click on Edit link in Content Items listing, we get to see the tabs.

What I notice is, when we are on a URL like: http://localhost/myproj/?q=node/180, we are able to see the tabs.

But when we see the aliased URL for the same content item such as: http://localhost/myproj/?q=news/test_news, we are NOT able to see the tabs there.

Also, there are some content types created by someone else, the content from which does show the tabs over them.

I checked almost all the possible settings (as per my knowlege), but No profit. While I need to finish this out very urgently.

Can someone please help me? I will really appreciate that.

Thanks,
Manish Aneja.

Comments

sumitshekhawat7331’s picture

have you created your own theme...and which drupal version r u using ?
otherwise open your page.tpl.php
and you will find a line

  <?php if ($tabs): print $tabs .'</div>'; endif; ?>

if not..you have to paste this code in ur page.tpl.php file

manishaneja’s picture

Hi sumitshekhawat7331,

Thanks for your reply.

I checked the tabs line in page.tpl.php and it exits there. Actually tabs are showing sometimes. But they are not showing for pages created by me. I am probably missing some logic here. I checked the permissions, and they look fine to me.

Also, when I check the Local tasks array at one of my templates not showing tab, by calling menu_get_local_tasks(), I see that children array does not contain anything and is empty.

This as far I understand is that the tabs are not being able to be generated from Drupal.

But No Idea, why is this happening.

manishaneja’s picture

Can this be a problem with URL aliasing because:

1. As I mentioned above if we open the content from one URL (http://localhost/myproj/?q=node/180), it shows the tabs, while the tabs are Not showing, if the same content is opened with the aliased URL (http://localhost/myproj/?q=news/test_news) the content is opened with tabs.

2. There doesn't look to be a problem with permissions, because tabs are viewed in one f the URLs.

sumitshekhawat7331’s picture

have you installed any module related to url...like pathauto.... bcoz normally these tabs are displayed by these codes...

 <div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner">
          <?php print $breadcrumb; ?>
          <?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>
          <?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
          <?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
          <?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
          <?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
          <?php if ($show_messages && $messages): print $messages; endif; ?>
          <?php print $help; ?>
          <div class="clear-block">
            <?php print $content ?>
          </div>
          <?php print $feed_icons ?>
          <div id="footer"><?php print $footer_message . $footer ?></div>
      </div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->

you can match this code with your page.tpl.php otherwise reinstall Drupal latest version or latest enabled modules

manishaneja’s picture

I have pathauto module installed. But I did not understand what do you mean by this code here? Should I have similar code in my page.tpl.php?
I can't reinstall Drupal because I have done very much of work within this.

sumitshekhawat7331’s picture

May its problem with ur pathauto module... but i don't think so.... and the code i have given to you ...must exist in page.tpl.php ....bcoz these 5-6 lines are very important.
you can try this...

manishaneja’s picture

Thanks for your kind cooperation,

I checked for these lines in my file and did not find following in my code:

<?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>
<?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
<?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
<?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
<?php if ($show_messages && $messages): print $messages; endif; ?>
<?php print $help; ?>

I tried writing these lines. But still tabs don't appear.

Also, so far what I understood and studied is that, these should display the tabs in my html. But the problem so far I understood is that tabs do not actually generate on these pages due to some problem and tabs array remains empty.

Also, when i install devel module, the devel tabs do still appear there, though Edit, View tabs still don't. I am absolutely stumbled. Please help.

Thanks

manishaneja’s picture

Anyone please if has some idea what can be the reason for this, it would be a great help.

Thanks.

kjl’s picture

Have you installed any access control modules? They could be limiting your ability to edit.

Also, check your input format settings. If the node is "Full HTML" and you only have permission to use "Filtered HTML", you won't see the tabs.

manishaneja’s picture

Thanks for your reply.

Yes, I have Access Control installed. But I have permissions for these pages for both create and edit and also for view.

Also I am using Filtered HTML and have full access to that as Well.