[Check layout / access of fields / etc] Fields don't work in category view

More
7 years 4 months ago - 7 years 4 months ago #68111 by exstreme
Adding custom fields in any of "Available zones" (above-description-line1
above-description-line1-nolabel
above-description-line2
above-description-line2-nolabel
under-description-line1
under-description-line1-nolabel
under-description-line2
under-description-line2-nolabel
renderonly)
But in category_items.php I become empty positions. By example
<!-- BOF above-description-line1 block --> <?php if (isset($item->positions)) : ?> <div class="lineinfo line1"> <?php foreach ($item->positions as $field) : ?> <div class="element"> <?php if ($field->label) : ?> <span class="flexi label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <div class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></div> </div> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF above-description-line1 block -->

items return object without positions.
Using any default template or copy of blog template
Last edit: 7 years 4 months ago by ggppdk.

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

More
7 years 4 months ago #68112 by ggppdk
Hello

first make sure that you are using the category layout that you are editing
...

so add to your file:
Code:
<?php echo 'current file: ' . __FILE__; ?>

and see if the above get printend


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
7 years 4 months ago #68122 by ggppdk
Hello

after doing the above to make sure that you are loading the specific layout
then you can send me a PM with super user login to look at this


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
7 years 4 months ago #68128 by ggppdk
Hello

in your custom layout you had deleted the positions from file
category_items.php
- The fieild positions need to exist in both the XML file and inside item.php (item view) or category_items.php (category view)

but it did not work with 'default' or 'blog' layouts either

- this was because you only had 1 field assigned to the type
also the field had no value for any item
and also the field has access "Super users" thus it would appear only to logged super user in frontend

i have changed the access of the field to "Public" and it is now showing


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
7 years 4 months ago #68130 by exstreme

ggppdk wrote: Hello

in your custom layout you had deleted the positions from file
category_items.php

How I had deleted? There isn't any values with name positions, that had given in object in category view. How can I delete empty values?
With deleting this file you solve problem?
Why positions works in item view, but in category view fails?

- this was because you only had 1 field assigned to the type
also the field had no value for any item
and also the field has access "Super users" thus it would appear only to logged super user in frontend

I assigned different positions and different fields, but how I said, object don't become positions.

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

More
7 years 4 months ago #68132 by exstreme
Problem was with category without existing user (who create category)
Code:
JUser: :_load: Unable to load user with ID: 36
Thank you! Problem solved.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.350 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline