Forums / Setup & design / Custom class problem

Custom class problem

Author Message

John Mina

Sunday 14 March 2004 2:16:45 am

Dear ALL,
first , please take a moment to read and help if u can. Please.

I want to created a new class for a daily word that would be fetched and published aoutomatically based on the date.
The custom class i created included date field, and a text field. not an XML field.
I created a section for that class.
I added 2 daily words in a folder that is assigned to the section i created.

in the front page i will show these fetched words. so i wrote direcly in the front_folder.tpl the following code:-

{let children=fetch(content,list,hash('parent_node_id',$n.node_id)) ch_count=fetch(content,list_count,hash('parent_node_id',$n.node_id)) }
{$ch_count}
{section var=child loop=$children}
{$child.item.name}
{/section}
{/let}

the problem that the always, the $ch_count is 0 while i ahve children in this folder, i am sure of that, and when i change the parent node id i can c that everythign is normal
and so it never enters the section to print out anything as it see nothing.:(

as amatter of fact i thought it may be a matter of anonymous user's roles problem, so enabled the anonymous user to read that section whereever it is in the contect
"content read Section( word ) "

I do appriciate your help. even if u have no answer for this please le tm eknow that my voice reached you please write me anything.
This matter had been bothering me since last week and i don't know how to proceed working i need that alot in my project so please try to help me if any suggestions
Sincerely John

Alex Jones

Monday 15 March 2004 6:22:30 am

John, a couple of quick questions:

1. What is $n? Has that been set previously? Are you able to view its contents?

2. Does an actual 0 show up for <i>{$ch_count}</i>, or is it empty? You may need to loop <i>$ch_count</i> to get past 0.

There may be other ways to achieve your goals. Will words be re-used after a certain period of time (day, week, month or a year?)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

John Mina

Tuesday 16 March 2004 1:11:44 am

First,Thanks A lot Alex for trying to help

$n is a node that is a father to all words that should be added, in other words, the folder that is containing all the "words"'s objects.

and the ch_count shows the number of children if available. only the children that he counts is that articles/ info pages/other fodler/or any built in class. but when it has only children from that custom class it counts ZERO, and also it doesn't go into any loop on the fetched record set.

Waiting your comment

Alex Jones

Tuesday 16 March 2004 6:27:52 am

Hrrrrm.... Did you also ensure the Anonymous role can read the custom class (in addition to the custom section)? What version of eZ are you running?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

John Mina

Wednesday 17 March 2004 12:05:44 am

Well yes,
i ensured that the anonymous user can view the section and the object, btoh together.
Regarding the version i forgot the version numebr i have? how would i get that to you?

what do u think ?
could it have anythign to do with the override.ini.append
sincerely

Alex Jones

Wednesday 17 March 2004 7:32:50 am

Hrrrm, I'm not sure what it could be to be honest. Sorry. I doubt that the override.ini.append could be the problem. Perhaps someone else can chime in and point out what we are missing.

To find your version number, go to the <i>Setup</i> section and view the <i>System Information</i>.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

John Mina

Thursday 18 March 2004 2:52:46 am

Thanks ALex, i do appriciate your help
or at least your try to help me
about the version number it is "3.3-3 (3.3)"
Thanks for that tip

Alex, do you have idea about the field of the online editor, to enrich the editing tool for articles/info pages...etc

BEst regards,
John

Alex Jones

Thursday 18 March 2004 7:18:46 am

Sorry, we don't use the Online Editor, so I do not know of that field.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

John Mina

Saturday 20 March 2004 11:56:18 pm

HEy helloooo
I got it working now
and i guess i knew the problem where it was?

After assigning the role of reading the section by the anonymous user, you have , again you have , or we have :) to CLICK THE STORE button,

i foound it as when i went to the page of viewing roles i didn't find the rold that i added last time i got in here, which enables the anonymous user to view the children of this section. and when i asked to edit the roles i foudn the ROLE there. so i clicked STORE button ,as i said, and directly i found it there in the ASsigned roles, alsoi foudn the EzPublish template that is counting the custom class children, counted them instead of just showing ZERO "0"

BEST Regards
JOhn

Alex Jones

Monday 22 March 2004 7:01:07 am

Glad to hear you figured it out! Sometimes it is the simplest things that prove the most annoying.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

eZ debug

Timing: Jan 19 2025 04:28:14
Script start
Timing: Jan 19 2025 04:28:14
Module start 'content'
Timing: Jan 19 2025 04:28:14
Module end 'content'
Timing: Jan 19 2025 04:28:15
Script end

Main resources:

Total runtime1.0663 sec
Peak memory usage4,096.0000 KB
Database Queries215

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.9453180.8438
Module start 'content' 0.00590.9103 769.7891630.8828
Module end 'content' 0.91620.1500 1,400.6719344.4453
Script end 1.0662  1,745.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.3714210.0002
Check MTime0.00140.1354210.0001
Mysql Total
Database connection0.00080.075910.0008
Mysqli_queries0.973191.25702150.0045
Looping result0.00210.19492130.0000
Template Total1.036297.220.5181
Template load0.00200.187220.0010
Template processing1.034296.989720.5171
Template load and register function0.00020.015610.0002
states
state_id_array0.00120.111510.0012
state_identifier_array0.00090.084520.0005
Override
Cache load0.00210.1939750.0000
Sytem overhead
Fetch class attribute can translate value0.00220.207730.0007
Fetch class attribute name0.00140.1270110.0001
XML
Image XML parsing0.00090.081530.0003
class_abstraction
Instantiating content class attribute0.00000.0036150.0000
General
dbfile0.00390.3687270.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
18content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 47
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs