67 Posts
Bonitto
7 years ago
10
Topic

I am having technical difficulties using FieldX and GroupX in the admin form. Whenever I try to create a new article for a content type that uses these fields, I am given the following errors for FieldX and GroupX respectively:

Notice: Undefined variable: empty in /mnt/data/vhosts/casite-736659.cloudaccess.net/httpdocs/plugins/cck_field/field_x/field_x.php on line 268

Fatal Error: Memory limit exhausted.

I have my dev environment hosted on Cloudaccess.net and this is the first time I've ever had this error occur because they give pretty accurate resourced for each environment. When I checked the current php memory limit I saw it is configured with 512M and php7.

Anyone else receiving this error?

Get a Book for SEBLOD
4229 Posts
Kadministrator
7 years ago
9
Level 1

Memory errors are one of most misleading errors as usually memory is actually consumed by scripts executed before the one mentioned in the error - last one can consume very little memmory but has misfortune to push total consumption over limit. Try asking clouaccess if they can help you pinpoint the cause.

67 Posts
Bonitto
7 years ago
8
Level 2

Please read Cloudaccess.net's response:

Danie checked further and the memory seems to be set correctly ( memory_limit is 512 MB as it should be). I also checked the file 'field_x.php' to find the error but not sure what's the issue as this the third party plugin and we are not aware of coding in detail.

I did research on this matter and found this: https://www.seblod.com/community/forums/general-discussions/undefined-variable-empty-in-field-x-php-on-line-266
I would suggest you to contact SEBLOD developers or support and ask what need to be done on our end as they are at the right position to guide you further with their extension issue.
You can then provide us the instructions so we can take care of it for you.

4229 Posts
Kadministrator
7 years ago
7
Level 3

Did you check that you specified field called in fieldX correctly as linked post says?

67 Posts
Bonitto
7 years ago
6
Level 4

To be honest I am a little confused as to how this thing works because the tutorial is outdated and the link provided goes to a 404 page: https://www.seblod.com/resources/tutorials/how-to-use-plugin-field-fieldx

4229 Posts
Kadministrator
7 years ago
5
Level 5

https://www.seblod.com/resources/tutorials/how-to-use-plugin-field-fieldx was unpublished by Seblod so I also deleted link to it.

But none of this tutorials have much to do with your error, as post linked above says you need to check you entered the name of the field that will be shown by fieldX. fieldX is multiple-copy field for some other field, so you need to tell it which field it needs to multiply.

67 Posts
Bonitto
7 years ago
4
Level 6

Gotcha Klas.

Thanks for the response but now I have more questions. Maybe it would be best I try and explain the needs of my use case. So here goes. 

I am creating a Location Content Type.

Each Location can have several departments. Each department has their own hours of operation for each day (i.e. Monday - Sunday). If I am understanding correctly, I know I will need to group these fields so that they can be repeated x number of times.

For instance a location may have 3 departments which has different opening hours for each day. So each repeatable group needs to have the following:

  • Department Name:
    • Open Days of the Week (i.e. Monday - Sunday)
      • Each Day has an Open and Close Time

What I have done so far is create the following fields to try and break each piece down into logical portions.

  • Department Name (Text Field)
    • Days of the Week (Checkbox w/ values from Monday - Sunday)
      • Opening Hours (Select - List)
      • Open Minutes (Select - List)
      • Open AM/PM (Select - List)
      • Closing Hours (Select - List)
      • Closing Minutes (Select - List)
      • Closing AM/PM (Select - List)

Now the tricky part is each Department needs a repeated Day of the Week field

AND

Each day of the week field would need it’s own repeated Opening/Closing hours

Now my plan was to figure out how I could take these values that a user would input and create a field that would concat their respective open and close times so that I could easily output a locations opening hours for each department and have that information easily searchable with a filter.

Can SEBLOD handle something like this? Been trying to figure out how to wrap my head around the best strategy to accomplish this. Thanks for any help that you can provide.

4229 Posts
Kadministrator
7 years ago
3
Level 7

The only way to do this in my opinion is to use related (nested) content types, with groupX or fieldX you can have only one level of nesting (fieldx in fieldx or groupX won't work).

67 Posts
Bonitto
7 years ago
0
Level 8

Thanks for your response.

Based on my use case how many levels deep of nesting do I need?

Could you provide a brief example to get me pointed in the right direction.

67 Posts
Bonitto
7 years ago
1
Level 8

Thoughts Klas?

4229 Posts
Kadministrator
7 years ago
0
Level 9

For each level, except last one,you need a separate content type, with each child having data about it's parent id (e.g. using Jpoomla related article field), then you use list field or list module to show it. For last level you can use fieldX or groupX or separate content type.

For details on how to do it there are plenty examples and information in the forum and in the Manuals / Tutorials.

Get a Book for SEBLOD