Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Cant choose Categorys when creating Menuitem

Cant choose Categorys when creating Menuitem 11 years 5 months ago #20897

  • dennishelm
  • dennishelm's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I like to create a Calendar View MenuItem, but i can´t select any categorys from the dropdownmenu. i´ve also testet another menutype (listview) same Problem here. I also did a fresh install of Joomla 3.1.1 and dtregister on another site - same there...

Can you fix it?
Thanks,
Dennis
Attachments:

  • Rendering Error in layout Attachment/Item: Property "protected" is not defined. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

Joomla 3.03 DTregister 3.01a

Cant choose Categorys when creating Menuitem 11 years 5 months ago #20921

  • mpalangio
  • mpalangio's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
I had exactly the same issue. After no response from opening a support ticket, I decided to investigate myself. Much longer story as to the what and why and I haven't tested whether or not this has effects in other
places but you need to change one line in catlist.php.

After installing com_dtregister3_0_2_J30b edit the following file:

pathToYourSite/htdocs/administrator/components/com_dtregister/models/fields/catlist.php

Change this:
FROM #__dtregister_categories where parent_id > 0 order by lft asc";

To this:
FROM #__dtregister_categories order by lft asc";

By removing the "WHERE parent_id > 0" qualifier (which should work by the way) you will now be able to see all your categories. This will also expose the root category, which you can either select or ignore.

Please Log in or Create an account to join the conversation.

Cant choose Categorys when creating Menuitem 11 years 5 months ago #20953

  • mpalangio
  • mpalangio's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
OK my last post wasn’t a 100% solution. I found that out while testing. Sorry about that.
For this feature to work properly you will need to change the following.
After installing com_dtregister3_0_2_J30b edit the following file:
Don’t make the change in my last post.
In the file: catlist.php
pathToYourSite/htdocs/administrator/components/com_dtregister/models/fields/catlist.php
Change this:
if(isset($children[0]))
foreach($children[0] as $pcategory){

To this:
if(isset($children[1]))
foreach($children[1] as $pcategory){


You will now have all your DT categories available for selection.

If you are like me and don’t want unpublished DT categories available for selection you can change the following line of code.
Change this:
$query = "SELECT categoryId, categoryName, parent_id FROM #__dtregister_categories where parent_id >0 ORDER BY lft ASC";

To this:
$query = "SELECT categoryId, categoryName, parent_id FROM #__dtregister_categories where parent_id >0 and published = 1 ORDER BY lft ASC";

By adding the “AND published = 1” qualifier you will now only see DT categories that are published.

Also you will need to change the event “list php” code so that you will only get events that are in the selected category and the selected category’s child categories without duplicates.
In the file list.php
pathToYourSite/htdocs/components/com_dtregister/views/event/tmpl/list.php
comment out 1 line of code.
Change this
$cat_id = JRequest::getInt('list'.$i,'');
TO this
// $cat_id = JRequest::getInt('list'.$i,'');

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.717 seconds