Article Links Broken

Article Links Broken, a forum discussion on Jojo CMS. Join us for more discussions on Article Links Broken on our General Discussion forum.

Back to Forum Index : Back to General Discussion   RSS
Triton

19 Sep 2009
Posts: 4

I've installed JoJo 1.0rc2, and have done almost no tweaking of settings, but I'm already running into a problem.

For the articles plugin, when I change the setting to allow categories, the links to the articles no longer work. That is, the front page and the articles page look fine, but when you click the article header or "read more" link, I get a 404 error.

Example of link with categories turned off:
http://localhost/jo/articles/1000/welcome-to-jojocms/

Same link with categories turned on:
http://localhost/jo/articles/1000/welcome-to-jojocms/

Note that it is exactly the same. However, when I actually click the link, the top example leads me to the correct article, but the bottom link leads to:
http://localhost/jo//1000/welcome-to-jojocms/

???

I'm not afraid of digging around in code to fix the problem, and I have a little, but I have a feeling I'm in a bit over my head with this problem. Any ideas?

Thanks.


tom

Developer

tom

19 Sep 2009
Posts: 379

hmm. have you set up an article category called 'articles' ? It shouldn't need to have it for the default, but that may have broken in the recent overhauls, and that may provide a simple fix.
It looks like getCorrectURL is assuming there will be a category for all articles if categories are enabled (which is why it returns blank in the redirect link)
Triton

19 Sep 2009
Posts: 4

Nope. Just two categories, News and Releases. I have one article in each (the example above is in News).

I'll have a look at getCorrectURL, but I'd still like some ideas on what else might be the problem.

Thanks.
tom

Developer

tom

19 Sep 2009
Posts: 379

the category name has to match the url of a page -
so if you have two categories set up, news and releases
you'll need two pages with urls set as news and releases, both linking to the Articles plugin
then in the template hardcoded links ought to be pointing to pages at
http://localhost/jo/news/ and http://localhost/jo/releases/
the individual article urls ought to match the above automatically as long as each article has been assigned to one of the two categories

Triton

19 Sep 2009
Posts: 4

OK, that seems to have solved the problem. Thanks for the quick responses.

I hate to say this though, but it wasn't exactly intuitive. I thought by turning on categories everything would be handled fine, so I was a little disappointed.

But, in any case, I like what I see so far, so I'll keep trying things out with it and coming back for help when I need it.

Thanks again.
tom

Developer

tom

20 Sep 2009
Posts: 379

yes, the whole categories system (on galleries too, and other plugins) was a bit of a hack to fill a need at the time (www.elsewhere.co.nz), and it needs an overhaul to remove it from the individual plugins and push it to the page handling code where it belongs.

The best thing I can say for it is that it works once you submit to its quirks, and that at least it works the same way across all plugins that use it, but that's about it.

It would be preferable if all content was handled more directly from the pageid, which would remove the need to double-reference the url, and would make the handling more straightforward for sites that use multiple languages as well as categories (where the urls can be the same for pages in different languages)

It's something I'll be looking at for Jojo 2 which, with Mike's complete rebuild of the domain/region/language handling code, will provide a good opportunity for taking a new approach.
Rick Rick

20 Sep 2009
Posts: 336

If you want to see hacks and quirks etc, try installing a gallery in Drupal... lots of pieces need installed, with dependencies, then you have to configure different relationships, node types etc. Not turn-key by any stretch of the imagination.

Turn-key is the ultimate goal, where things can be turned on and work "as expected" to minimise any learning curve... Jojo does this fairly well considering how quick it's had to grow.

edit: CONVOLUTED! That's the word I was looking for!
Triton

20 Sep 2009
Posts: 4

I'd absolutely have to agree with you there. I've tried so many other CMS systems and get so frustrated with having to add this and add that, that I become totally confused as to what's connected to what and what effect it will have on other plugins and pages.

Anyway, this is a nice CMS, so I'm working at it.
Back to Forum Index : Back to General Discussion   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.