Operations links to edit forums and their containers leads to plain the "list" view (default). No error messages.

example.com/admin/content/forum

Comments

derjochenmeyer’s picture

Steps
- created a "testcontainer" <root>
- created a "testforum" <root>
- tried to edit "testforum"

Expected:
- editpage

What happend:
- link does not work.
- No editpage

dvessel’s picture

Priority: Normal » Critical

ew, marking as critical.

fwalch’s picture

Status: Active » Needs review
StatusFileSize
new707 bytes

The menu item to edit a forum is "admin/content/forum/edit/%forum_term". However, there is no function corresponding to this placeholder. The attached patch adds a "forum_term_load" function to forum.module, which fixes the bugs.

You have to re-enable the forum module to make the changes effective.

fwalch’s picture

StatusFileSize
new850 bytes

I just noticed that I didn't create the last patch correctly... here's a new one.

dvessel’s picture

Status: Needs review » Needs work

You have to cvs diff from root. The changes do work but i have no clue on how it's doing it? Nothing calls "forum_term_load" directly. Is that part of a hook?

I think it should be documented a bit more. I'd do it myself but I don't understand it.

bdragon’s picture

Status: Needs work » Reviewed & tested by the community

Works perfectly and looks OK.

My only comment is that I don't see any documentation on some of the other _load functions (example: aggregator_feed_load) -- Is there a convention for marking functions as being there to provide menu placeholders?

bdragon’s picture

Status: Reviewed & tested by the community » Needs work

OK, two comments on the documentation block, heh.
Back to CNW.

bdragon’s picture

I looked at all the other _loads in core and the documentation block isn't wildly different than some of them.

I withdraw my comment about the documentation block.

However, dvessel pointed out in IRC that the patch needs to be rolled from the root.

bdragon’s picture

Status: Needs work » Needs review
StatusFileSize
new892 bytes

Rerolled from root.

dvessel’s picture

Status: Needs review » Reviewed & tested by the community

I briefly chatted with bdragon in IRC. He mentioned that these types of functions aren't really documented much. I guess your expected to understand the menu system to know what's going on here.

Patch applies cleanly and does its job.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs review

Isn't there a term loading function already? This does not seem like containing anything special for forum terms in menu paths, so I think we could easily get away with using/reusing the term loading in taxonomy module, if there is any. I did not check.

bdragon’s picture

Status: Needs review » Needs work

You reminded me of something with your question.

The function should return FALSE when the tid is not part of the forum vocabulary.
CNWing, followup patch in a sec.

bdragon’s picture

Status: Needs work » Needs review
StatusFileSize
new1.03 KB

OK, this one will return page not found if you attempt to put in a tid that is not part of the forum vocabulary.

gábor hojtsy’s picture

Status: Needs review » Fixed

Well, *this* looked logical, thanks! Committed!

Anonymous’s picture

Status: Fixed » Closed (fixed)