Project:Node clone
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi,
I have installed the module and it worked fine. Than I decided to fine tune the options and sfter saving the new ones, the tab Clone disappeared. Tried to clean all types of caches, reinstall and install the module but wthout any succssess. Could somebody provide my some info what actually happen?

Comments

#1

after some experiments, the problem is related to the variable `clone_omitted`. Once the variable is set in the database, in all content type, no matter of the type and teh provided restrictions, the tab dissappear. Once the variable is deleted, the baviour, as expected, normalizes. There is also additional additional checkbox, which appears in Omitted content types, which does not have nay value. this is what is included in the filed.

a:21:{s:1:"!";i:0;s:14:"advpoll_binary";i:0;s:22:"casetracker_basic_case";i:
0;s:6:"client";i:0;s:12:"companygroup";i:0;s:5:"event";i:0;s:5:"forum";
i:0;s:8:"shortcut";i:0;s:7:"minutes";i:0;s:11:"multichoice";i:0;s:12:"no
detemplate";i:0;s:5:"order";i:0;s:4:"page";i:0;s:5:"panel";i:0;s:7:"prod
uct";i:0;s:25:"casetracker_basic_project";i:0;s:4:"quiz";i:0;s:15:"advpoll_ranking";
i:0;s:5:"story";i:0;s:22:"og_user_roles_subgroup";i:0;s:5:"larry";i:0;}

#2

ok, well if it's a bug we should fix it in the HEAD (6.x) version first. i don't see the bug in 6.x, however.

Looking at the source, I see the stupid bug in 5.x:

function clone_is_permitted($type) {
  return !in_array($type, variable_get('clone_omitted', array()));
}

Should either be using strict checking:

function clone_is_permitted($type) {
  return !in_array($type, variable_get('clone_omitted', array()), TRUE);
}

or use the code that's in 6.x:

function clone_is_permitted($type) {
  $omitted = variable_get('clone_omitted', array());
  return empty($omitted[$type]);
}

#3

Status:active» needs review

try this patch.

AttachmentSize
tabs-disappeared-360794-3.patch 968 bytes

#4

Thank you

It works as expected with the patch.

#5

Status:needs review» fixed

committed to both 5x versions

#6

Status:fixed» closed (fixed)

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