Added Category didn't show up.

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
8/9/2005 4:31:38 PM
Gravatar
Total Posts 15

Re: Added Category didn't show up.

Hey Joe,

I've found and solved what I think was a small bug with Add Category in the mp_blogcategories_select_bymodule stored proc on postgresql. If you added a new category but didn't attach it to a new blog entry the category never showed up on the page. Then you would have the entry in the database but no way to attach new blog entries to it. I’ve solved it in the stored proc below with a left outer join.

Take a look and let me know if it works as advertised.

Take Care

Phil



CREATE OR REPLACE FUNCTION mp_blogcategories_select_bymodule( int4) RETURNS SETOF mp_blogcategories_select_bymodule_type AS
$BODY$

select
bc.categoryid,
bc.moduleid,
bc.category,
count(bic.itemid) as postcount
from
mp_blogcategories bc

left outer join mp_blogitemcategories bic
on bc.categoryid = bic.categoryid


where bc.moduleid = $1

group by bc.categoryid, bc.moduleid, bc.category

order by bc.category;$BODY$
LANGUAGE 'sql' VOLATILE SECURITY DEFINER;
8/10/2005 1:21:23 PM
Gravatar
Total Posts 18439

Re: Added Category didn't show up.

You are absolutely correct Phil, Thanks!

I just checked to see if I made the same mistake in MS SQL and MySQL and was surprised to find I am using a left outer join in both of those.

I've updated the script for postgres stored procedure and will commit it in just a minute.

Thanks,

Joe
You must sign in to post in the forums. This thread is closed to new posts.