This module shows the taxonomy in an interactive mindmap like tree layout. It can be used to generate mind maps using the Drupal taxonomy.It uses the D3 javascript library to generate the interactive tree from the taxonomy.

https://www.drupal.org/sandbox/anshisolutions/2322937

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/anshisolutions/2322937.git d3_taxonomy_mindmap
cd d3_taxonomy_mindmap

Comments

t-lo’s picture

Hi,

Found a one issues on pareview.sh here:
http://pareview.sh/pareview/httpgitdrupalorgsandboxanshisolutions2322937git

You need to add a README file (Or just rename the current one to README.txt)

Going to take a closer look through the code now.

t-lo’s picture

There are multiple copyright notices throughout the code that I believe clash with the requirement for all code on Drupal.org to be GPL.

t-lo’s picture

The Taxonomy tree is not displayed, this appears to be caused by an incorrect URL in the file tree.js

Starting line 49:

jQuery.ajax({
          url: '/taxonomy_mindmap/getdata/',

From a look at your hook_menu I think this should be '/d3_taxonomy_mindmap/getdata/'

t-lo’s picture

Status: Needs review » Needs work
t-lo’s picture

The readme.txt and ReadMe.txt files you've included appear to be related to a wordpress plugin rather than this drupal module

anshisolutions’s picture

Dear Sir,

I have fixed the issues highlighted by you. Apologies for the tree.js error. I changed the drupal module name and forgot to change the tree.js file. I should have done the testing after that change which I missed. This is fixed now.

Regards
Shivani

anshisolutions’s picture

Status: Needs work » Needs review
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

t-lo’s picture

Hi Shivani,

Thanks,

I've confirmed PAREVIEW is now clean, but the taxonomy tree is still not being displayed for me.

The previous error is sorted but I'm now receiving the JS error

Uncaught TypeError: Cannot call method 'forEach' of undefined

for line 52 of tree.js

root.children.forEach(collapse);

This is a blank drupal install with one taxonomy created with Devel Generate, here's the JSON returned to the Javascript by it's call to "d3_taxonomy_mindmap/getdata/"

{
parent: -1,
name: "pr",
children: [
{
tid: "13",
vid: "2",
name: "wrisimes",
description: "description of wrisimes",
format: "plain_text",
weight: "0",
depth: 0,
parents: [
"0"
],
children: [
{
tid: "30",
vid: "2",
name: "fro",
description: "description of fro",
format: "plain_text",
weight: "9",
depth: 0,
parents: [
"13"
],
children: null
}
]
},
{
tid: "23",
vid: "2",
name: "cho",
description: "description of cho",
format: "plain_text",
weight: "1",
depth: 0,
parents: [
"0"
],
children: null
},
{
tid: "19",
vid: "2",
name: "jejogospi",
description: "description of jejogospi",
format: "plain_text",
weight: "1",
depth: 0,
parents: [
"0"
],
children: null
},
{
tid: "25",
vid: "2",
name: "meslapheche",
description: "description of meslapheche",
format: "plain_text",
weight: "1",
depth: 0,
parents: [
"0"
],
children: null
},
{
tid: "15",
vid: "2",
name: "sl",
description: "description of sl",
format: "plain_text",
weight: "4",
depth: 0,
parents: [
"0"
],
children: [
{
tid: "22",
vid: "2",
name: "vicluregat",
description: "description of vicluregat",
format: "plain_text",
weight: "2",
depth: 0,
parents: [
"15"
],
children: null
}
]
},
{
tid: "1",
vid: "2",
name: "spuphuprad",
description: "description of spuphuprad",
format: "plain_text",
weight: "4",
depth: 0,
parents: [
"0"
],
children: [
{
tid: "2",
vid: "2",
name: "baslip",
description: "description of baslip",
format: "plain_text",
weight: "5",
depth: 0,
parents: [
"1"
],
children: [
{
tid: "4",
vid: "2",
name: "dugatref",
description: "description of dugatref",
format: "plain_text",
weight: "8",
depth: 0,
parents: [
"2"
],
children: [
{
tid: "10",
vid: "2",
name: "thipregifr",
description: "description of thipregifr",
format: "plain_text",
weight: "5",
depth: 0,
parents: [
"4"
],
children: null
}
]
}
]
}
]
},
{
tid: "3",
vid: "2",
name: "triphauef",
description: "description of triphauef",
format: "plain_text",
weight: "5",
depth: 0,
parents: [
"0"
],
children: null
},
{
tid: "27",
vid: "2",
name: "ch",
description: "description of ch",
format: "plain_text",
weight: "8",
depth: 0,
parents: [
"0"
],
children: null
},
{
tid: "11",
vid: "2",
name: "kudratriw",
description: "description of kudratriw",
format: "plain_text",
weight: "8",
depth: 0,
parents: [
"0"
],
children: [
{
tid: "20",
vid: "2",
name: "jebislupisih",
description: "description of jebislupisih",
format: "plain_text",
weight: "8",
depth: 0,
parents: [
"11"
],
children: null
}
]
},
{
tid: "5",
vid: "2",
name: "limobr",
description: "description of limobr",
format: "plain_text",
weight: "9",
depth: 0,
parents: [
"0"
],
children: [
{
tid: "6",
vid: "2",
name: "stu",
description: "description of stu",
format: "plain_text",
weight: "0",
depth: 0,
parents: [
"5"
],
children: [
{
tid: "28",
vid: "2",
name: "mahat",
description: "description of mahat",
format: "plain_text",
weight: "2",
depth: 0,
parents: [
"6"
],
children: null
},
{
tid: "12",
vid: "2",
name: "checicludel",
description: "description of checicludel",
format: "plain_text",
weight: "4",
depth: 0,
parents: [
"6"
],
children: [
{
tid: "14",
vid: "2",
name: "thi",
description: "description of thi",
format: "plain_text",
weight: "2",
depth: 0,
parents: [
"12"
],
children: null
}
]
},
{
tid: "18",
vid: "2",
name: "chewrusputi",
description: "description of chewrusputi",
format: "plain_text",
weight: "7",
depth: 0,
parents: [
"6"
],
children: null
},
{
tid: "8",
vid: "2",
name: "capro",
description: "description of capro",
format: "plain_text",
weight: "9",
depth: 0,
parents: [
"6"
],
children: [
{
tid: "16",
vid: "2",
name: "ch",
description: "description of ch",
format: "plain_text",
weight: "3",
depth: 0,
parents: [
"8"
],
children: null
},
{
tid: "24",
vid: "2",
name: "brithiprug",
description: "description of brithiprug",
format: "plain_text",
weight: "10",
depth: 0,
parents: [
"8"
],
children: null
}
]
},
{
tid: "26",
vid: "2",
name: "wraheslewr",
description: "description of wraheslewr",
format: "plain_text",
weight: "9",
depth: 0,
parents: [
"6"
],
children: null
}
]
}
]
},
{
tid: "9",
vid: "2",
name: "thego",
description: "description of thego",
format: "plain_text",
weight: "9",
depth: 0,
parents: [
"0"
],
children: null
},
{
tid: "7",
vid: "2",
name: "wre",
description: "description of wre",
format: "plain_text",
weight: "9",
depth: 0,
parents: [
"0"
],
children: null
},
{
tid: "17",
vid: "2",
name: "crospiw",
description: "description of crospiw",
format: "plain_text",
weight: "10",
depth: 0,
parents: [
"0"
],
children: null
},
{
tid: "29",
vid: "2",
name: "sit",
description: "description of sit",
format: "plain_text",
weight: "10",
depth: 0,
parents: [
"0"
],
children: null
},
{
tid: "21",
vid: "2",
name: "swo",
description: "description of swo",
format: "plain_text",
weight: "10",
depth: 0,
parents: [
"0"
],
children: null
}
]
}

t-lo’s picture

Status: Needs review » Needs work
anshisolutions’s picture

Dear Sir

Will it be possible for you to provide the taxonomy export of your setup. I will import in my installation and test. Looks like some bug that comes with a specific pattern. Do you have more than one term at root level in taxonomy?

Regards

anshisolutions’s picture

Status: Needs work » Needs review
t-lo’s picture

Hi Shivani,
There are multiple terms at root level, here's the taxonomy structure as CSV:

"wrisimes"
"wrisimes","fro"
"cho"
"jejogospi"
"meslapheche"
"sl"
"sl","vicluregat"
"spuphuprad"
"spuphuprad","baslip"
"spuphuprad","baslip","dugatref"
"spuphuprad","baslip","dugatref","thipregifr"
"triphauef"
"ch"
"kudratriw"
"kudratriw","jebislupisih"
"limobr"
"limobr","stu"
"limobr","stu","mahat"
"limobr","stu","checicludel"
"limobr","stu","checicludel","thi"
"limobr","stu","chewrusputi"
"limobr","stu","capro"
"limobr","stu","capro","ch"
"limobr","stu","capro","brithiprug"
"limobr","stu","wraheslewr"
"thego"
"wre"
"crospiw"
"sit"
"swo"

t-lo’s picture

Status: Needs review » Needs work
anshisolutions’s picture

This is strange. It is working perfectly on my page http://www.anshisolutions.com/content/d3-taxonomy-mindmap with your taxonomy. Is it because of some other module you have published in your setup that is causing javascript clash?

anshisolutions’s picture

Status: Needs work » Needs review
t-lo’s picture

Hi Shivani,
It's a blank install with only devel and your module installed.

Still getting the error

Uncaught TypeError: Cannot call method 'forEach' of undefined

for line 52 of tree.js

root.children.forEach(collapse);

anshisolutions’s picture

Dear Sir,

It looked a very strange error. In my ajax call I was using dataType: 'JSON' that was working perfectly on my site. But in a blank install, it was not working and adding the unnecessary slashes. I had to change it to dataType: 'json' to get things working. Dont know why it was working on my main site. May be some other module is doing the aliasing. This is fixed now.

Apologies for the inconvenience

t-lo’s picture

Hi Shivani,

I can confirm that's working now, looks good!

anshisolutions’s picture

Dear Sir,

Thanks for confirming. Please let me know the next steps.

Regards
Kinshuk

anshisolutions’s picture

Status: Needs review » Reviewed & tested by the community
kscheirer’s picture

Status: Reviewed & tested by the community » Needs work

Blocking Issues:

  • Please don't RTBC your own issues, if you would like to speed up the review process we recommend getting a review bonus: https://www.drupal.org/node/1975228
  • Remove all licensing and copyright information from your files. Drupal.org's packaging scripts will add necessary license information.
  • d3.v3.min.js is 3rd party code and cannot be hosted on drupal.org. Consider using a dependency on the d3.js module instead. This policy is described in the getting involved handbook. Also, the Libraries API module is a recommended method for adding 3rd party dependencies without directly including the code on Drupal.org.
  • All variables (like d3_taxonomy_mindmap_vocab) should be removed in a hook_uninstall()
  • buildrectree should be namespaced to your module, like d3_taxonomy_ buildrectree()

Non-blocking issues:

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.