Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi KK,

This might well be a silly question, but I wonder if the following has to do with my Firefox noscript add-on or whether I get it wrong from reading the tutorial where you repeatedly say sth along these lines,
Refresh the template within your browser by revisiting about.php and now visit the admin section once again. Notice how about.php now appears in the list of templates in the sidebar on the left and how the right panel informs you that about.php has no editable regions defined yet.

It sounds as if I only have to visit/refresh the .php page, not the admin panel, but it doesn't work here that way.
After visiting the first page (say, index.php) and then changing over to the admin panel, nothing has happened there. I have to press F5, am asked to send again, and only then the index.php template appears in the sidebar of the admin panel.

So, again, is this the way it actually has to be, or should I, after visiting/refreshing the .php page, see the template in the admin panel without having to refresh/resend there?

I have no problem with refreshing the admin page, and everything is working fine, but I still would like to know if this is indeed the way it works and whether I am mistaken when interpreting your quote (see above) in the sense that no refresh in admin panel is necessary...

Thanks for any hints and, BTW, also for the new version of CouchCMS!

Solaris
Hi Solaris,

Once again, there are never any silly questions - so thanks for asking.

Replying to your question -
When we make any structural changes to a template (i.e. pertaining to the editable regions contained within it), we need to execute the template to make Couch pick up and persist the changes. This is why we are required to 'visit' the template using the browser - this invokes Couch and it makes the changes that should now be visible in the admin-panel.

The thing is. although the changes have been effected in the database, when we switch over to the admin-panel we are actually seeing the previous version of the template. To see the revised version we need to refresh the admin-panel too.

So, you are correct - there are two refreshes involved -
The first one (front-end) is mandatory and is the one that cause the changes to happen
The second (back-end) is simply necessary because of the way HTTP (non AJAX) works - you need to refresh a page to see the revised HTML.

Hope this answers your query.
Hi KK,

KK wrote: when we switch over to the admin-panel we are actually seeing the previous version of the template. To see the revised version we need to refresh the admin-panel too.

Having your quote from the tutorial (see first posting) in mind, my question was actually only referring to the first time we get over to the admin panel, when there hasn't been any template in the sidebar before.

But from your answer I gather that, even then, you have to refresh the admin panel before seeing the template appear there for the first time.

That's what I would have expected, too, but taking your quote literally I just wanted to make sure there isn't any special technique in Couch that allows to do so that my noscript add-on might be impeding. :)

So, thanks a lot for answering my question!

Solaris
3 posts Page 1 of 1