Page 1 of 1

[fixed]Content block in GCB: no update when content upd

Posted: Thu Jun 21, 2012 8:57 am
by airelibre
I tried this :

Creating a new Template with the default content
Add {global_content name='my extra block'} at the bottom just before the <__body>
Create a new GCB with : "My content : {content block='My block 2'}" and without using WYSIWYG
Modify an existing page (in my case, the "Templates and stylesheets" default page), change the template and edit the "My block 2" content area (this is working well)
Go to front end: the page does not display the second block

It works when I clear the cache, but when I edit the page content, I always have to clear the cache after, even when the page isn't marked as "cachable"

In the general options, I didn't thick the "Enable Smarty caching" option, "Do a compilation check" is checked, and "Allow browser to cache pages" isn't checked

Config : Php5.3.10 on Ubuntu-Linux / Apache2
Tell my if you need some tests

Re: Content block in GCB: no update when content updated

Posted: Thu Jun 21, 2012 2:14 pm
by Rolf
confirmed in rev. 8077

Re: [reproduced]Content block in GCB: no update when content

Posted: Thu Jun 21, 2012 3:11 pm
by calguy1000
I actually never tested this prior to beta.

It's gonna take some experimentation to see if we can get this to work properly, and not break too much other stuff.

Re: [reproduced]Content block in GCB: no update when content

Posted: Thu Jun 21, 2012 8:17 pm
by calguy1000
by george I think I got it!!

I changed the {content} function from a normal smarty plugin to a 'compiler' plugin. This seems to solve it... and a few other problems.

I also found some more optimizations, so I think that the current SVN stuff is faster than beta1 ...

Re: [reproduced]Content block in GCB: no update when content

Posted: Fri Jun 22, 2012 12:40 pm
by airelibre
Hi,

Thank you, but I just got the 8095 rev, and it doesn't seem to work.

It's worse because now, when I clear the cache nothing is displayed for the {content} in the GCB... must I do a new installation (I just had overwrite the old files)?

Other problem, but I don't know if it's related: the "apply" button in GCB doesn't work. If you do :
Edit a GCB and change its content
"Apply"
Return to GCB list and edit the same gcb : the old version is still here
The Submit action is ok

Re: [reproduced]Content block in GCB: no update when content

Posted: Fri Jun 22, 2012 1:15 pm
by calguy1000
I just tested:

1. Create a a GCB called 'has_content'

Code: Select all

<h4>Before content block</h4>
<p>{content block='in_gcb' oneline=true}</p>
<h4>After content block</h4>
2. Copied the NCleanBlue page template to ncb2

3. Edited ncb2 page template and after {content} added

Code: Select all

{global_content name='has_content'}
4. Created a new page, told it to use ncb2 as the template.
- added some text to the text field marked 'in_gcb'

5. Viewed page.
The second content block did not appear.... not sure why.
Clearing cache fixed this.


6. Edited the new page, changed the text in the in_gcb text field.
7. Reload the page
all worked fine.

Repeated steps 6 and 7 numerous times. No problems.

Re: [reproduced]Content block in GCB: no update when content

Posted: Fri Jun 22, 2012 2:43 pm
by airelibre
Ok, this works as you said. I have to see what is the difference between your test and mine. I'll post again later

Re: [fixed?]Content block in GCB: no update when content upd

Posted: Mon Jun 25, 2012 12:33 pm
by airelibre
I just did the test on a new install - SVN rev 8109 and it works like you said: first refresh (without clearing cache) not working, but after that it's ok

Another question about that: will we be able to make something like an {include} with subtemplates? Or must we use GCB for that?

Thank you

Re: [fixed?]Content block in GCB: no update when content upd

Posted: Wed Jun 27, 2012 4:28 pm
by calguy1000
Another question about that: will we be able to make something like an {include} with subtemplates? Or must we use GCB for that?
CMSMS doesn't exclude the use of the {include} tag. (It's used in a few module templates to facilitate recursion). However, we restrict the directories that are searched. You can still use resources.

{global_content name='foo'} is in essence just a fancy {include} tag... something like: {include file="globalcontent:foo"}

It's untested, but your page template can now include content blocks that are inside GCB's ... so therefore they should be able to include content blocks from within other page templates, or even module templates (though this would probably be a dumb idea in most cases).

Re: [fixed]Content block in GCB: no update when content upd

Posted: Thu Jun 28, 2012 8:00 am
by airelibre
Ok thank you

When you say "It's untested, but your page template can now include content blocks that are inside GCB's", do you mean having {content} in a GCB? Because it's tested and it's the subject of this forum post.. or maybe I haven't understood your sentence?