New categories created via free tagging are not saving with the correct Organic Groups information.

Expected results:
A new category created via free tagging for a new/modified content node should be saved with the same Organic Group information as the node from which it is created.

Actual results:
The newly created category (via free tagging) is saved with no Organic Groups information. As a result the new category is invisible to the person creating it and to all users.

Comments

ianchan’s picture

Help.. update.. please??

bdragon’s picture

Title: New Categories via Freetagging not Saving Correctly » Freetagging modernization
Version: 5.x-1.1 » 5.x-1.x-dev
Assigned: Unassigned » bdragon
Category: bug » task

(hijacking issue)

The 5.x freetagging code in general is outdated.

I think I'll spend a bit of time overhauling it now. Patch coming shortly...

bdragon’s picture

Status: Active » Needs review
StatusFileSize
new7.6 KB

Quite a bit in here.

* Change the way freetagging categories are created (use drupal_execute()) -- This should fix the OP's problem.
* Add a column for choosing which content type to use when creating freetagging categories on the fly.
* Move some code around.

If I didn't break anything, I'd like to get this in ASAP, so I'd be obliged if someone would help test this out.

--Brandon Bergren
(Interim) Category maintainer

ianchan’s picture

Thank you for posting the patch. I will test today.

ianchan’s picture

Testing results

1. New categories created via freetagging allow page author to edit category. Prior to patch, categories created via free-tagging were not editable by the author.

2. Free-tag generated categories are NOT inheriting the originating node's OG selections. The author must go to the category and add OGs to the newly created category.

3. Containers do not retain free-tagging checkmark after saving with the free-tagging box checked.

When I examine the container's $node, I see the following:

<!-- stdClass Object
(
    [nid] => 14
...
    [has_synonyms] => 0
    [hierarchy] => 1
    [multiple] => 1
    [required] => 0
    [tags] => 
    [freetag_node_type] => category_cat
    [hidden_cont] => 0
...
)
-->

5. The category_cont table updates successfully when updating module.

Hope this info is useful.

bdragon’s picture

1) Hmm, did it used to be that the categories were attributed to Anonymous then?

2) OK, I guess this would be due to Category not knowing about OG.. I thought the problem you were having was broken saving of nodes... This seems like something an addon module would handle... Not sure exactly which way would be the best regarding magically filling out another node's organic groups information... Hmm...