1
sailjapan
symlink - template_c folder

xoops 2.3.1

Resized Image Hi,
in the templates_c folder there is a readme that states:
Quote:
Just kept for backward compat. It is recommended to point the folder to xoops_data/caches/smarty_compile/ with symlink.

I upgraded one of my sites from 2.0.13.2 to 2.3 and then 2.3.1
I am unable to upload a .tar archive of a backup set of templates via the templates upload link [Edit: though a .tar.gz archive will upload].
Could it be that the lack of this 'symlink' is what is preventing me from doing so?
If that's the case, how would I go about setting up a symlink?

there are no debug errors shown when trying to upload, but the window which opens after clicking on 'upload' shows 'No file uploaded
Back to template set manager '

Any help appreciated.

[Edit: Pic added. Why would these templates have a red number next to them?]
Never let a man who does not believe something can be done, talk to a man that is doing it.

2
GPboarder
Re: symlink - template_c folder
  • 2008/11/11 16:49

  • GPboarder

  • Friend of XOOPS

  • Posts: 248

  • Since: 2006/10/6


In working with the templates, I noticed that the red number indicated a different number of templates in a cloned or uploaded set than the number in the default set.

This is causing me a big problem due to the inability to edit the default templates.
Optimism is the mother of disappointment.

3
sailjapan
Re: symlink - template_c folder

My uploading problem is kind of sorted, but this weird template control panel thing is stuffing me up like GPboarder. Why would a default set of templates not clone correctly?
I'm pretty sure it's something to do with templates now being moved out of the templates_c folder.
I have a back up site which is a carbon copy of my public site with the exception of members and content. All the modules and hacks get done there first. Every thing works fine there, but not here on the live site. I tried moving a template set from my 'B' site to my 'A' site but that shows red numbers too... flummoxed.
Never let a man who does not believe something can be done, talk to a man that is doing it.

4
sailjapan
Re: symlink - template_c folder

Ok, done some digging around and come up with this idea:
The default template set has duplicates of some templates. They are identical in every sense except their ID numbers. Both the ID numbers are actually pointing to the same file.

According to a readme file in 2.0.18 archive:

Quote:
Incompatibility with some modules
---------------------------------
Beginning with XOOPS 2.0.14, a change in the core template methods resulted in some incompatibilities with some modules that do not have their templates under (dirname)/templates/ as many XOOPS modules do. Some example are: wraps, 3dforum etc.. If you use one of these modules, you may fix this problem by replacing the resource.db.php file located in the class/smarty/xoops_plugins/ folder by the one provided in the package "extras" folder. This file is the patch provided by Gijoe on peak.xoops.ne.jp. This issue is one that will be addressed further in later core releases, to provide better compatibility. We would like to thank GiJoe from peak.xoops.ne.jp for his work with this issue.


Now, just guessing here, seeing as how both GPboarder and I upgraded to 2.3 directly from 2.0.13.x I guess we never got around to applying this fix as mentioned in the readme.

Did the updater do it for us? I think not.

So, somehow we need to apply it. I've been to GI Joe's site (actually at xoops.peak.ne.jp), but can't find any reference to it (in English) there. I'll have a dig around here, but does anyone remember what needed doing, and more importantly, does anyone know if it's retroactively possible to make the necessary changes?

Off to search the xoops.org
Never let a man who does not believe something can be done, talk to a man that is doing it.

5
ghia
Re: symlink - template_c folder
  • 2008/11/12 2:14

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Compare your class/smarty/xoops_plugins/resource.db.php file with the original from the XOOPS 2.013 release (on SourceForge). Then implement the found differences to your file from 2.3.1.

Normally the red numbers have also a link to update or generate the templates.
You may also try setting 'Update module template .html files from themes/your theme/templates directory?' temporary to true in your general system preferences.

6
sailjapan
Re: symlink - template_c folder

I don't think 2.0.13 had class/smarty/xoops_plugins/resource.db.php

It had class/smarty/plugins/resource.db.php There was no xoops_plugins folder.

I may be wrong as I cannot find the archive on sourceforge and am looking at an old backup.


I suppose I should add the one from the extras folder... Does that sound right?
Never let a man who does not believe something can be done, talk to a man that is doing it.

7
ghia
Re: symlink - template_c folder
  • 2008/11/12 10:25

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1



8
sailjapan
Re: symlink - template_c folder

Sorry to be being extra cautious, but I just want to check that we're talking about the same two files. One "resource.db.php" can be found in 2.0.13.x 's class/smarty/plugins, and the other "resource.db.php" in 2.3.1 's class/smarty/xoops_plugins

I should be comparing the two files and adding the changes from the newer version to the file in the original smarty/plugins folder thereby having two resource.db.php files?

class/smarty/xoops_plugins/resource.db.php
&
class/smarty/plugins/resource.db.php

That doesn't sound right...

My XOOPS already has the new class/smarty/xoops_plugins/resource.db.php from it's upgrade...

sorry guys, I'm feeling dense tonight. What am I misunderstanding?

[Edit: By the way, I've compared the two files and the code is almost completely different...]
Never let a man who does not believe something can be done, talk to a man that is doing it.

9
Anonymous
Re: symlink - template_c folder
  • 2008/11/12 13:25

  • Anonymous

  • Posts: 0

  • Since:


Not sure you're missing a great deal. Firstly, see this:
http://en.wikipedia.org/wiki/Symbolic_link

Secondly, the resource.db.php file (the GIJOE solution) was written by him to remedy problems with module compatability following a change to the way that templates were handled in XOOPS 2.0.14 compared with earlier versions, e.g. 2.0.13.2.

The file may be needed for some of GIJoe's modules to maintain compatability with XOOPS from 2.0.14 onwards. GIJoe doesn't want to update his modules because they are compatible with other xoops-derived CMSs, most notably xoopscube. GIJoe sees XOOPS as being at fault but nonetheless helped out with his fix.

You shouldn't need to use the file unless you use GIJoe's modules on XOOPS 2.0.14 onwards, e.g. XOOPS 2.3.1

I'm not sure if the file-fix helps compatability with older modules from other developers. Perhaps others can advise? How old are the modules that are givint the red links?


10
Anonymous
Re: symlink - template_c folder
  • 2008/11/12 13:46

  • Anonymous

  • Posts: 0

  • Since:


SJ

I think you might be suffering a consequence of upgrading rather than using a clean installation.

Can you download the 2.3.1 Full Package and

1. delete the class/smarty/plugins and class/smarty/xoops_plugins folders

2. upload the same folders from the 2.3.1 package

3. update the system module

This comes with a health warning, i.e. backup first!
You could go the "whole hog" by removing all the files in your website except:

/cache
/Frameworks (if you have it)
/modules
/templates_c
/uploads

and xoops_data and and xoops_lib

You could then delete any modules that come with the core and then upload the 2.3.1 Full Package minus:

/cache
/templates_c
/uploads

and xoops_data and xoops_lib

This would get rid of any orphaned files and give you a vanilla 2.3.1 installation.

BTW, I've just checked and none of my templates are red-flagged. Mind you, I don't use any cloned templates.

Login

Who's Online

304 user(s) are online (215 user(s) are browsing Support Forums)


Members: 0


Guests: 304


more...

Donat-O-Meter

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

Latest GitHub Commits