1
Groover
Module template stopped updating
  • 2004/7/9 19:43

  • Groover

  • Just popping in

  • Posts: 23

  • Since: 2004/7/1 2


I've spent the last week working on a completely custom module that includes a couple of blocks. I've been editing the template in Pico, saving and then logging in as Admin and updating the module. No problems.

Today I made a couple template changes, updated the module, cleared templates_c, tested, etc. then went back and made another change to the template. Now XOOPS won't use my changed template nomatter how many times I update the module and clear templates_c. When I update the module it says that the template and block code were updated to the database... I did manage to somehow get it to do one update but now I've made another change it is back to ignoreing them again. This is getting very frustrating.

I'm using XOOPS 2.0.7. The block is only visible to one group and is set to "no cache".

I would be grateful for any help!

Groover

2
Mithrandir
Re: Module template stopped updating

Sorry for stupid counter-question, but you are using the default un-cloned template set, right?

And you are 100% certain that the error is not in the PHP coding prior to display? (just eliminating causes)

3
Groover
Re: Module template stopped updating
  • 2004/7/9 20:16

  • Groover

  • Just popping in

  • Posts: 23

  • Since: 2004/7/1 2


I haven't cloned my module so yes, I'm using the default template set.

If I remove my one line change to the PHP code and modify the template so the only thing added is the line:

Name:<br>

update the module, clear templates_c. It doesn't show "Name:" at the start or in the page source code.

Groover

4
Groover
Re: Module template stopped updating
  • 2004/7/9 20:36

  • Groover

  • Just popping in

  • Posts: 23

  • Since: 2004/7/1 2


Maybe this is a clue. If I go to the templates section of the Admin menu I see two sets: default and custom. Custom is my cloned set.

My module is only listed under the cloned set. For the number of templates it shows "0" in red. It also shows a "Generate" link next to the zero. When I click on "List", it shows all of my module templates with nothing for the "last modified" time. The only action is "Generate".

Groover

5
Groover
Re: Module template stopped updating
  • 2004/7/9 20:55

  • Groover

  • Just popping in

  • Posts: 23

  • Since: 2004/7/1 2


I clicked on "generate" and it added my templates to both default and custom. Now I see it is showing "Name:" at the start of the block, so it is now using my latest modification.

I change "Name:" to "Name2:", update the module and it is still showing "Name:"! Now if I look at the Templates section I see that the template has been updated for the Default template set but not for my custom template set. Only now there is no Generate button to get it into by custom template set. This is driving me nuts. Am I missing something obvious?

Groover

6
Mithrandir
Re: Module template stopped updating

Only the default template set is updated on module update - this is in order not to overwrite any customisations, you've made (pretty annoying to spend 50 hours on getting your templates right and then it's all messed up in a module update, don't you think? )

Therefore I suggest you switch to use the default template set until you are happy with the module's templates. In a development environment, I never clone my templates - too much work as you have also noted.

To re-generate the template in the cloned template set, first delete it, then generate.

7
Groover
Re: Module template stopped updating
  • 2004/7/9 21:22

  • Groover

  • Just popping in

  • Posts: 23

  • Since: 2004/7/1 2


OK, so say my site is up and running and I need to modify my module, including the template. Is this the normal steps to take?:

1. Switch to default theme
2. Edit and test module/templates
3. Delete changed templates in custom theme
4. Generate changed templates in custom theme
5. Switch back to custom theme

If that is correct then it seems strange to me because:

1. It is not possible to make a quick minor tweak to a module, you have to close off public access to the site which you do it
2. Why did everything work fine for me for a week when I wasn't doing this cloning business but I was using a non-default template set?

Groover

8
Mithrandir
Re: Module template stopped updating

First off: Don't confuse themes and templates (I don't think you do in practice, so this is just a service message to any readers )

1. Minor tweaks should not be done in the template file, but via templates admin (clone -> find template -> edit) that's why the templates admin is there. On a live site, you shouldn't need to make big changes to the templates - and if you do, I suggest you have a test site where you try out things until they are as you want them and THEN you make the copy-update module-delete template-regenerate

2. Not sure, probably because it was using the template from the default template set since the template to be used did not exist in the cloned template set - why it suddenly stopped working like that, I don't know.

9
tl
Re: Module template stopped updating
  • 2004/7/9 22:01

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


If the modification does not show, as your cloned template has not been updated, go to the template manager, click on your cloned template, find the module and the template, use browse to find the local copy of the template file then upload.

It works for me this way.


10
Groover
Re: Module template stopped updating
  • 2004/7/9 22:12

  • Groover

  • Just popping in

  • Posts: 23

  • Since: 2004/7/1 2


Thanks guys for the help. I'm back to writing code again, even if I don't understand the relationship between updating a module and the template set manager 100%. I think it would be nice if it had a link to "delete and generate all templates" in a module. Also maybe an option somewhere to automatically do this in all themes when a module is updated.

Groover

Login

Who's Online

104 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 104


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits