Saturday, 03 December 2016
  12 Replies
  2K Visits
0
Votes
Undo
Hi,

I use v3.4.25. I have disabled the "Make fields available in lists and calendar" because of high drop of performance. I have many events and several custom fields.

I want to do something very simple but I get lost in the documentation and FAQ.
I want to display a table, excel look, with 3 custom fields. There are five columns "Date", "Title", "Field1", "Field2", "Field3".
What is the procedure I need to follow?

br
Roland
7 years ago
·
#179666
0
Votes
Undo
Use the event list menu item type and select the columns you want to display.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

7 years ago
·
#179744
0
Votes
Undo
Hi,
The event list menu item type lists only core fields/columns. How do I do to display 3 custom fields from a field collection?
br
Roland
7 years ago
·
#179761
0
Votes
Undo
Hi Roland,
there is a little trick here. Down the fields selection area you will notice a textarea which gets populated when you add a column. If you use your Custom Fields template tag, you can add them there easily. You can get your custom fields template tag choosing them in the Custom Layout editor.

This is not ideal, but we are working on improving the Events lists view to include better usability.
7 years ago
·
#179762
0
Votes
Undo
Hi
Actually a better trick is to make the "Make fields available in lists and calendar" back to YES while editing ;) .The fields selection area shows then my custom fields. So the table shows well now my 3 custom fields.

BUT, when I put back the "Make fields available in lists and calendar" back to NO the table does not show the values. I am back to the starting block. What am I doing wrong?

Roland
7 years ago
·
#179797
0
Votes
Undo
Oh!! I was not aware Geraint implemented that!!. Great!!

If you want to show the fields, you need to have the "Make fields available in lists and calendar" set to YES at any time.
7 years ago
·
#179801
0
Votes
Undo
I cannot set them to YES because it slows down too much the performance of the web site.
Is there a way to show the 3 custom fields in a table with a Latest Events module that I can customize? Do you have an example of a procedure allowing me to retrieve them?
Roland
7 years ago
·
#179806
0
Votes
Undo
I'm afraid the only way to have Custom fields availabel in lists (and calendar) views and in latest events module, is setting that option to Yes.

As it's only 3 fields, maybe you can "use" other core fields for this purpose with a bit of language overrides...

Do you have any measure of how bad the performance is when you enable that option?
7 years ago
·
#179807
0
Votes
Undo
Performance decreases drastically. I have about 600 events and 28 custom fields. These are used for setting up the events.
I have managed so far because I show some of the custom fields in the event detail view. But I need at least one tabular view, ummmhh, very bad news here!
7 years ago
·
#179856
0
Votes
Undo
600 events and 28 custom fields should not be that slow - it may be worth enabling Joomla debug mode to see which database queries are slow and if there are any optimisations that can be made.

The solution I have for you is to create a template override to temporarily enable list output for custom fields ONLY for that menu item type.

Create a file templates/YOURTEMPLATE/html/com_jevents/default/list/events.php with this content


<?php
defined('_JEXEC') or die('Restricted access');

$cfplugin = JPluginHelper::getPlugin('jevents', 'jevcustomfields' );
$dispatcher = JEventDispatcher::getInstance();
$oldplugin = new plgJEventsJevcustomfields($dispatcher, (array) ($cfplugin));
$dispatcher->detach($oldplugin);

$cfpluginparams = new JRegistry($cfplugin->params);
$cfpluginparams->set("inlists",1);
$cfplugin->params = $cfpluginparams->toString();
$newplugin = new plgJEventsJevcustomfields($dispatcher, (array) ($cfplugin));
$dispatcher->attach($newplugin);

$params = JComponentHelper::getParams( JEV_COM_COMPONENT );
$order = $params->get("dataorder", "rpt.startrepeat asc, rpt.endrepeat ASC, det.summary ASC");
$this->data = $this->datamodel->getRangeData($this->startdate,$this->enddate,$this->limit, $this->limitstart, $order);

$this->_header();
//$this->_showNavTableBar();

echo $this->loadTemplate("body");

$this->_viewNavAdminPanel();

$this->_footer();

// revert for modules etc.
$dispatcher->detach($newplugin);
$dispatcher->attach($oldplugin);



This will temporariy switch the custom fields in list option on for this one menu item type

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

7 years ago
·
#179860
0
Votes
Undo
I agree with Geraint. That setup should not be that slow. I have a client site with more than 6000 events and 30 CF and there are no performance issues. Debugging it to profile the problem seems like a good idea before going with Geraint approach (which by the way you can also use to improve performance a bit ;) )
7 years ago
·
#179931
0
Votes
Undo
Hi,

Really big thanks for your exemplary support.

I have found the problem. Very strange: the custom fields xml file was corrupted! I found that by chance after a fantastic crash when saving a simple modification for a custom field. I noticed while looking for a backup xml file that the size of the xml was 8Mb instead of being several Kb, this since the creation of my first custom fields.

The corruption is simple: the xml contained hundreds and hundreds of backslashes in some fields on the "description" text part.

Attached a file with the example of one corrupted field, extracted from the series of fields I have. For this one field size is 2Mb.

Now all is ok and performance is acceptable.

br
Roland
7 years ago
·
#179935
0
Votes
Undo
Can you do some investigation for me please - each time the custom fields are edited an archive of the old version is created in the archive folder in the custom fields plugin path.

Can you check if there are many versions of the files and if they grew through time? I'm trying to see if something about the way you edited the file caused this exponential growth in the size of the file.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.