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

Post Reply
User avatar
airelibre
Dev Team Member
Dev Team Member
Posts: 98
Joined: Tue Dec 01, 2009 3:42 pm
Location: Alsace // France

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

Post 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
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

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

Post by Rolf »

confirmed in rev. 8077
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post 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 ...
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
airelibre
Dev Team Member
Dev Team Member
Posts: 98
Joined: Tue Dec 01, 2009 3:42 pm
Location: Alsace // France

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

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
airelibre
Dev Team Member
Dev Team Member
Posts: 98
Joined: Tue Dec 01, 2009 3:42 pm
Location: Alsace // France

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

Post 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
User avatar
airelibre
Dev Team Member
Dev Team Member
Posts: 98
Joined: Tue Dec 01, 2009 3:42 pm
Location: Alsace // France

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

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post 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).
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
airelibre
Dev Team Member
Dev Team Member
Posts: 98
Joined: Tue Dec 01, 2009 3:42 pm
Location: Alsace // France

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

Post 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?
Post Reply

Return to “Closed Issues”