67 Posts
Bonitto
7 years ago
19
Topic

Hi, 

So I have a weird issue where I have an Item view template override with seb_minima template and for some odd reason, whenever I add my Group X field to the Item View, the module no longer loads any data. However, when I remove it, I am able to see data when I var_dump( $cck ); in the seb_minima template. I am not sure if there's a limit to the amount of fields (I literally mean SEBLOD fields and not items) that a Seblod List Module can output but I can't figure out why does the module no longer output data if I add my Group X field in Item View.

I am not sure what could be causing this because as I said, the Group X fields do appear when I change the template to Seb_one. I also referenced: https://www.seblod.com/community/forums/fields-plug-ins/fieldx-and-search but I don't think we have the same issue since my fields will output if I either change the template to seb_one or if I'm going to use seb_minima I have to remove the Group X field from the Item View.

Get a Book for SEBLOD
1283 Posts
Bucklash
7 years ago
0
Level 1

Hi Bonitto

I don't get the same result as you....

I copied over my seb_one position variation to seb_minima ... changed template for item view and all is good...

<?php
// No Direct Access
defined( '_JEXEC' ) or die;
?>


<?php
// var_dump($cck->get( 'group_x_field' )->value);
?>
<div>
   <?php echo $cck->renderField('art_alias'); ?>
</div>
<h3>Group X Stuff</h3>
<?php foreach($cck->get( 'group_x_field' )->value as $gx){ ?>


  <p><?php echo $gx['test_field-1']->label; ?></p>
  <p><?php echo $gx['test_field_1']->value; ?></p>
  <p><?php echo $gx['test_field_2']->label; ?></p>
  <p><?php echo $gx['test_field_2']->value; ?></p>
  <p><?php echo $gx['test_field_3']->label; ?></p>
  <p><?php echo $gx['test_field_3']->value; ?></p>
<?php } ?>

Add some screenshots or some code stuff...

67 Posts
Bonitto
7 years ago
1
Level 1

This one is actually very difficult for me to explain or provide pictures because the only code that I have in my seb_minima override is 

var_dump( $cck );

I could probably show you for you to see as a better explanation.

67 Posts
Bonitto
7 years ago
0
Level 2

After showing Bucklash the issue, he also concluded that there is something weird going on. Once my group_x field reaches the 8th repeatable field, my list and search type module ceases to output any data.

We double checked the tables and queries to see if I had something incorrectly set and the only thing that I didnt do properly was set the Group X field's storage to Custom | Article | group_x_field_name[content_type_name]. After I set it to the correct value, my list and search type module still failed to output

67 Posts
Bonitto
7 years ago
0
Level 1

Ok so from what I have found, there seems so be some sort of limitations with the Intro View. I have a Content Type - Object: None that is meant to just hold a group of fields for Group X. My Group X field is set to be repeated up to 21 times, however I am able to confirm that my List Module will only output if I have no more than 7 repeated fields that have been entered. Once I get to my saving my 8th repeated field, var_dump($cck) no longer shows any data. I have debugging turned on and can confirm that the db query doesn't change so I am unsure as to what is the problem.

Here is a snapshot for the fields that I have in my Intro View. Please note that all of the fields in this view have their storage set to unlocked and follow the principles discussed here: https://www.seblod.com/community/forums/fields-plug-ins/field-x-my-learning-process-shared-2#post52114

4229 Posts
Kadministrator
7 years ago
8
Level 1

Hi,

only limitation that I can think of is size of the database column where data gets stored, which is in your case group_x_field_name. Click on the alter checkbox next to the storage, then change it's size, e.g. id it is currently varchar(512) change it to varchar(1024).

Other than this only other options is that you are hitting some sort of hosting limitation, e.g. memory limit, you need to enable error reporting to see such errors.

67 Posts
Bonitto
7 years ago
7
Level 2

Hi Klas,

Thanks for your response. I have had error reporting in Joomla set to Development mode and SEBLOD set up in debug mode and no errors are present nor do I see any in my error log. Cloudaccess also gives a pretty hefty 512MB of RAM for each instance so I don't think that's the issue. 

I have gone ahead and made your suggested modifications to my Group X field. By default my Group X field was set to Text, however I changed it to Varchar(512), Varchar(1024), Varchar(2048) and unfortunately, I still am seeing the same result. The weird thing is that if I am to output my Group X field in my Content Type's Content View, all of my Group X fields output without a problem. So I am unsure of what else I am to do at this point or if I am doing something wrong.

7 years ago
1
Level 3

Hi Bonitto,

Some confusion here. 

Please look into the database how a groupX is saved! It's a string, such as JSON string.

If the string can not be save due to the fact that the longer of database field is not enough you will not have any error message. So please check if the full string is save into the database even if you add more than 8 repeated field.

In your case it seems that after adding 8 items in your groupX, the GroupX string is cut that's why SEBLOD can no more display it. If SEBLOD don't get/see the full string it can not look field values in it.

The issue can be the string is not save fully into database or when SEBLOD request this string to manage the display SEBLOD don't get the full string.

Are you using only the SEBLOD List module to display data or another module?

Thanks.

1283 Posts
Bucklash
7 years ago
0
Level 4

Hi folks 

I tried to help out and so i have seen the db etc. 

1

Groupx data is complete, not truncated ie ends properly with ::end/cck:: or whatever it is

2

The list view renders fine, just not the item view - .... so a change of template might confirm this (currently seb_minima)

3

the storage of groupx was changed from mygroupx to mygroupx[mycontenttype]

entry in db looks ok for #__cck_core_fields

Maybe that has spawned a gremlin...

4

The content type repeated by groupx has object 'none' - maybe that has spawned a gremlin

4229 Posts
Kadministrator
7 years ago
4
Level 3

There is no logical reason for this, but you might be hitting some weird bug - please put your groupx and child content types in an app and export it and send it to klas.berlic at octopoos.com so I can see if I can replicate this.

67 Posts
Bonitto
7 years ago
3
Level 4

Hi Klas,

I emailed you an akeeba backup of my site and an Export of one of my Content Types since I don't seem to be able to export when the Object of my Content Type is set to None. I also provided you with Super User access to the backend of my dev site.

4229 Posts
Kadministrator
7 years ago
2
Level 5

Hi,

I received them, I will check.

4229 Posts
Kadministrator
7 years ago
1
Level 6

Should be resolved now.

67 Posts
Bonitto
7 years ago
0
Level 7

Hi Klas,

I am pasting our emailed conversation here just so that anyone else who encounters this issue has a thread to follow because the issue is not resolved. 

In the email you replied:

I don't get any problems with default template and with removed overrides anyore, 10 department hours show without a problem.

I changed items bellow:

  • your group content type object to article, group object must match object set in fields.
  • limit set in module to 0 (no limit)
  • your groupX field storage to dept_hrs_grpx (there should be no [dept_hrs_grpx] here.

I then replied:

Thanks so much for your time and help. Are you saying that we cannot use the seb_minima template overrides (which was a template you guys created so that we can create clean overrides in the first place) to output list modules beyond a certain limit? That is definitely a problem. Especially because even if you use the default Beez template and the seb_minima template override, the list module still does not output so I don't see how is this problem solved. So it seems that SEBLOD's seb_minima template has issues with outputting the list module. Unfortunately, I need to use a template override so that I can control the output and create additional functionalities SEBLOD will not allow me to do.


Also, I set the Object type to: None because I didn't want users to be able to create additional Department Hrs Group Content Types. The only time that additional Department Hours should be able to be created is when a user is creating or modifying and Location Content Type. So now my understanding of how things work is definitely confused. Or is what I'm requesting not possible? 


The point I am trying to get at is that my initial post said that I am having problems using the seb_minima template to output list data beyond a certain limit, how does using a different template solve that problem when I am trying to make sure that my code has as little seblod markup as possible so that I have more control over how things output and we were instructed to use this template for that reason.

4229 Posts
Kadministrator
7 years ago
1
Level 1

There is no issue with List module - as written in email, issue comes either from your override or the fact that you used object None on your child content items (but used fields with Article object - fields and content type storage must be the same even if you would like it to be otherwise). With override removed and storage correctly set everything works as expected. 

You can use overrides in minima the same as in any other template, but it must be done correctly to work.

67 Posts
Bonitto
7 years ago
0
Level 2

Hi Klas,

I must clearly be doing something wrong then if you're correct but I have another weird use-case where the SEBLOD list module fails to output once a certain limit has been reached it seems. I created a new content type called career_opportunities and a list and search type called list_careers. I created a template override using the seb_minima template and everything lists correctly for as long as I do not list more than 5 items.

It literally doesn't load any content once I get beyond 5 items. I have also made sure to change the default count from 5 to 10. The only time the items output is if I unpublish the 6th content type. I have error reporting and debugging turned on and that fails to output as well.

However when I change from the seb_minima to the seb_one template, all of the items output...

4229 Posts
Kadministrator
7 years ago
0
Level 1

Have you tried running this on another host?

Where can I see the problem on the frontend?

4229 Posts
Kadministrator
7 years ago
2
Level 1

Found it.

Your problem comes from the fact that you use advanced module manager to load list module instead of joomla one. Everything works ok if I replace

{module Careers List}

with

You should really be using module field or list field, instead of current usage of content plugin inside text field to load module to load list (bad for performance)

Also I noticed you site is very slow and requires a lot of resources to tun, this comes from a fact that you are using huge number of extensions and a template framework on top, using 3rd party extensions with Seblod is usually not needed.

67 Posts
Bonitto
7 years ago
1
Level 2

Hi Klas,

Thanks so much for your help and suggestions. My goal is to actually replace all of the extensions that were used to build their site with solely SEBLOD and Gantry 5 =). But it's a slow process because I have to learn what pieces work so as I learn more about SEBLOD's functionalities, I can begin to remove more of their extensions for a more complete SEBLOD solution. 

It's just quite difficult because sometimes SEBLOD's documentation lacks clarity and I don't really know how do I achieve a specific goal without asking for assistance and I run into weird issues like this that I don't know how to diagnose. I've been using Regular Labs (formerly NoNumber) Extensions for quite some time because of the ease of use, flexibility, and awesome support so I wouldn't have had a clue that could be causing problems.

Really the only extensions being loaded on my front end are Gantry 5 + SEBLOD + DJ Megamenu + AJAX Search plugin (which I am not sure if SEBLOD can replace but I will be asking later on) for the most part. The extensions you see in the backend are more or less for data and url redirect management purposes for their staff. 

So for now on if I am going to add a list to a content type, I understand the best way is to use a list field or Joomla's default {loadmodule} snippet

4229 Posts
Kadministrator
7 years ago
0
Level 3

Hi,

yes, or joomla module field,which calls module directly while {loadmodule} requires that first plugin processes this, then calls module then finnaly a list.

Get a VIP membership