Author Topic: Problem with Includes  (Read 1041 times)

0 Members and 1 Guest are viewing this topic.

Soenke

  • Guest
Problem with Includes
on: Fri, 18. October 2002 - 18:56:36
Hallo!

I've found this wonderful Template-System recently. Now I'm changing my Scripts... and encountered the following problem:

When using one template directly, everything works fine. Now I included it in another  template and it does not work. To be correct: Yes, the template is included, but only the loops were parsed. The "normal" variables were definitely not.

To illustrate the problem a bit more detailled:

Code: [Select]

$tmpl = new vlibTemplate'templates/form.tpl.html';

$tmpl-setVar'name',$name;

...

$tmpl-setLoop'ticons',$this-_config'icons';

...

$tmpl-pparse;



works, while the same (with some more variables)  will not work with "preview.tpl.html" which includes "form.tpl.html". Oddly, includes work with another template in the same script.

Maybe anyone has an idea... if you need other details please ask.

Thanks,

Soenke

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
Problem with Includes
Reply #1 on: Sat, 19. October 2002 - 10:08:21
I have the same problem I think.

Please look here
/subdomains/vlib...wtopic.php?t=81

Please download the 3.0.3 for testing and see if it works there.

---

Unter vlibTemplate 3.0.3 funktionierte das noch tadelos. Probier das bitte mal.

Ich werde ein kleines Beispielskript schreiben, dass erst includiert und dann versucht Variablen zu ersetzen.

Ich halte Dich auf dem laufenden.

Gru�
Claus

Soenke

  • Guest
Problem with Includes
Reply #2 on: Sat, 19. October 2002 - 10:55:26
Yes this could be the same problem, I will try your advice with version 3.03 and tell you about it.

---

Ja, das k�nnte das gleiche Problem sein, ich werde es mal mit der 3.03 probieren und Dir dann berichten.

S�nke

Soenke

  • Guest
Problem with Includes
Reply #3 on: Sat, 19. October 2002 - 12:13:28
So, I tried version 3.08 since there is a major change in the include-function at version 3.09. And - oh wonder - it works fine with 3.08. So there is a bug in the changed code. If there is more information needed to fix this bug, please ask.

---

Also, ich habe es mit der Version 3.08 versucht, da eine gr�ssere Ver�nderung der include-funktion in Version 3.09 gemacht wurde. Und es funktioniert einwandfrei. Da hat sich wohl beim "Geschwindigkeitsrausch" ein Fehler eingeschlichen. Komisch ist, dass ist bei einem anderen Include von mir gegangen ist...

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
Problem with Includes
Reply #4 on: Sun, 20. October 2002 - 11:54:48
I have written an example to reproduce the bug.

See:
/subdomains/vlib...wtopic.php?t=81

releasedj

  • Guest
Problem with Includes
Reply #5 on: Thu, 24. October 2002 - 10:38:54
This should have been fixed with vLIB 3.0.10.

Regards,

Kelvin

PS: Sorry for the delayed response, I've just been away for a week.

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
Problem with Includes
Reply #6 on: Thu, 24. October 2002 - 11:19:22
Quote
PS: Sorry for the delayed response, I've just been away for a week.

No need to apologize. You deserve your holidays.

I had things under control here I think.

Best regards,
Claus