Smarty error: unable to read resource: PLEASE HELP

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
spod_dmd
Forum Members
Forum Members
Posts: 25
Joined: Fri Oct 26, 2007 2:56 am

Smarty error: unable to read resource: PLEASE HELP

Post by spod_dmd »

Hi

I have a menu set up in menu manager that is called from a page whose id is 54 and I get this error message:

string(73) "Smarty error: unable to read resource: "module_db_tpl:54;Sentiments Menu""

I can't seem to correct this bug. It did used to work prior to upgrade.

Emptied all caches, tried just {menu} which worked minus any CSS, and lots of other variations.

Can anyone suggest where to be looking?

CMSMS: 1.6.5
MenuManager: 1.4.1
Name of menu db template: Sentiments Menu
Smarty tag used: {menu template='Sentiments Menu'}

Any help greatly appreciated, it's driving me nuts.

Thanks.

Trevor.
Last edited by spod_dmd on Wed Jan 20, 2010 5:25 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Smarty error: unable to read resource: PLEASE HELP

Post by Dr.CSS »

Do yourself a favor and don't use spaces in the naming of them...
spod_dmd
Forum Members
Forum Members
Posts: 25
Joined: Fri Oct 26, 2007 2:56 am

Re: Smarty error: unable to read resource: PLEASE HELP

Post by spod_dmd »

Thanks Dr CSS. Good advice that I have taken onboard.

However it hasn't resolved this issue.

I have noticed on other posts that the error is slightly different in that instead of 54 (which is the page id) it says MenuManager. Her's an example:

string(83) "Smarty error: unable to read resource: "module_db_tpl:MenuManager;EcoBusiness Main""

...whereas mine is:

string(73) "Smarty error: unable to read resource: "module_db_tpl:54;Sentiments_Menu""

Does this have any bearing on the problem or suggest any solutions?

Thanks in advance.

Trevor.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Smarty error: unable to read resource: PLEASE HELP

Post by Dr.CSS »

Ok, so you went to menu manager and either clicked make new template or click import button to make a new menu, did whatever changes you may have needed named it, saved it, then in page template you put the menu tag {menu template='nameOfTemplate'}?...

If so then you may have done something wrong along the way like put .tpl on end of template call in menu tag, it would help if you explained exactly how you went about making this template etc...
spod_dmd
Forum Members
Forum Members
Posts: 25
Joined: Fri Oct 26, 2007 2:56 am

Re: Smarty error: unable to read resource: PLEASE HELP

Post by spod_dmd »

I have actually solved the problem by using exactly the same code in a new file menu template and uploading that and using {menu template='sentiments.tpl'} in the page template.

So the menu is working but it still bothers me that I can't use db menu templates.

After successfully using a file menu template I deleted all db menu templates and imported the new 'sentiments.tpl' file as a db menu template, saved it as 'sentiments' changed the page template to use {menu template='sentiments'} and the error was back so it suggests to me that some file hasn't uploaded possibly and the call to the db is broken.

What do you think?

Trevor.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Smarty error: unable to read resource: PLEASE HELP

Post by Dr.CSS »

It sounds to me like your going thru the files in the module and not just using the menu manager admin, you should be able to go to menu manager and import and existing menu template rename it and make whatever changes you want, you should never go into the modules files to do this, once it is imported the call for it is just the name of it w/o the .tpl on the end...
spod_dmd
Forum Members
Forum Members
Posts: 25
Joined: Fri Oct 26, 2007 2:56 am

Re: Smarty error: unable to read resource: PLEASE HELP

Post by spod_dmd »

That's what I did.

I saved an existing file template 'cssmenu.tpl' as 'sentiments.tpl', cut/pasted the code from the db template 'Sentiments Menu' over the code in 'cssmenu.tpl' and saved. I FTP'd this to the 'Templates' folder of the 'MenuManager' module so that it was now available in the 'File Templates' tab of the admin 'Menu Manager'. I deleted any existing db templates in the 'Database Templates' tab.

Firstly I changed the smarty tag in the page template to read:

{menu template='sentiments.tpl'}

This menu worked.

I then went to the 'File Templates' tab of Menu Manager in the admin site and clicked the 'Import Template to Database' icon next to sentiments.tpl. I saved this as a db template called 'sentiments'.

I then changed the page template to use:

{menu template='sentiments'}

This stopped the menu working and the error was back:

string(68) "Smarty error: unable to read resource: "module_db_tpl:54;sentiments""

So, identical menu code works as a file template but not as a db template.

Any clues here as to why the db template won't work?

Thanks.

Trevor.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Smarty error: unable to read resource: PLEASE HELP

Post by Dr.CSS »

This makes no sense to me, I've made literally hundreds and hundreds of menu templates and never had a problem like that, my main site itself has over a hundred menu templates and I make a living building templates for cmsms sites, do you have any yelloow ! or red X in your system info page...
spod_dmd
Forum Members
Forum Members
Posts: 25
Joined: Fri Oct 26, 2007 2:56 am

Re: Smarty error: unable to read resource: PLEASE HELP

Post by spod_dmd »

Hi Dr CSS

Yes there are but no different than 3 other sites on this server that have no problems.

They are yellow exclamation marks:

Maximum Execution Time (max_execution_time): 30
Maximum Post Size (post_max_size): 8M
Maximum Upload Size (upload_max_filesize): 2M

Otherwise all OK I think.

However thousands fail the checksum comparison, should this be of concern?

In fact even deleting all the core modules and reFTPing them still produces errors for all the 1.6.5 files. The checksum is definately 1.6.5. This can't be right can it?

Trevor.
Last edited by spod_dmd on Thu Jan 21, 2010 4:09 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Smarty error: unable to read resource: PLEASE HELP

Post by Dr.CSS »

The checksum problem can be a few things, but I've never used them...

As for the other problems I would hazard to guess it's a permissions problem...
spod_dmd
Forum Members
Forum Members
Posts: 25
Joined: Fri Oct 26, 2007 2:56 am

Re: Smarty error: unable to read resource: PLEASE HELP

Post by spod_dmd »

Right. The checksum's a separate issue and not one that concerns me now.

As for the permissions setting causing the error, where do you think the permissions could be wrong?

Thanks.

Trevor.
Post Reply

Return to “Modules/Add-Ons”