- Posts: 13
COMMUNITY FORUM
k2_override problem
- davicod
-
Topic Author
- Offline
- New Member
Less
More
12 years 5 months ago - 12 years 5 months ago #107694
by davicod
k2_override problem was created by davicod
Hi,
I had a problem as i was trying to create a k2_content override.
I followed the instructions at
getk2.org/documentation/tutorials/item/77-k2-template-override-package-comparison
I want to have more that one k2_content override so inside my mytempate/html/mod_k2_content folder i copied and pasted twice the default folder and i gave defferent names.
Then i set some of my k2_content modules to use the sub-templates i created.
That's all i did, i didnt change anything at the php files yet.
When i work locally, i m able to see the sub-templates and assign them to some of my modules, with no problem.
But when i put the site online i get this error
Warning: require(/home/egnapost/public_html/modules/mod_k2_content/tmpl/default.php) [function.require]: failed to open stream: No such file or directory in /home/egnapost/public_html/modules/mod_k2_content/mod_k2_content.php on line 55
Fatal error: require() [function.require]: Failed opening required '/home/egnapost/public_html/modules/mod_k2_content/tmpl/default.php' (include_path='.:/opt/php53/lib/php') in /home/egnapost/public_html/modules/mod_k2_content/mod_k2_content.php on line 55
Also i cant see the sub-templates i created from the backend of the online site, but the override folders are at their place.
Am I doing something wrong?
Thanks for your time
yorgos
PS. If i set my online site's modules to use the default sub-template, the site works normally.
I had a problem as i was trying to create a k2_content override.
I followed the instructions at
getk2.org/documentation/tutorials/item/77-k2-template-override-package-comparison
I want to have more that one k2_content override so inside my mytempate/html/mod_k2_content folder i copied and pasted twice the default folder and i gave defferent names.
Then i set some of my k2_content modules to use the sub-templates i created.
That's all i did, i didnt change anything at the php files yet.
When i work locally, i m able to see the sub-templates and assign them to some of my modules, with no problem.
But when i put the site online i get this error
Warning: require(/home/egnapost/public_html/modules/mod_k2_content/tmpl/default.php) [function.require]: failed to open stream: No such file or directory in /home/egnapost/public_html/modules/mod_k2_content/mod_k2_content.php on line 55
Fatal error: require() [function.require]: Failed opening required '/home/egnapost/public_html/modules/mod_k2_content/tmpl/default.php' (include_path='.:/opt/php53/lib/php') in /home/egnapost/public_html/modules/mod_k2_content/mod_k2_content.php on line 55
Also i cant see the sub-templates i created from the backend of the online site, but the override folders are at their place.
Am I doing something wrong?
Thanks for your time
yorgos
PS. If i set my online site's modules to use the default sub-template, the site works normally.
Please Log in or Create an account to join the conversation.
- Peter Grube
-
- Offline
- Elite Member
Less
More
- Posts: 241
12 years 5 months ago #107695
by Peter Grube
Replied by Peter Grube on topic Re: k2_override problem
Hi yorgos,
When you copied the default folder & rename them, did you open the new folder you created & copy the files in the tpl folder (default.php) to the actulal folder, so the file path to that file is your-template/html/mod_k2_content/ your_overide_folder / default.php
When you copied the default folder & rename them, did you open the new folder you created & copy the files in the tpl folder (default.php) to the actulal folder, so the file path to that file is your-template/html/mod_k2_content/ your_overide_folder / default.php
Please Log in or Create an account to join the conversation.
- davicod
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 13
12 years 5 months ago #107696
by davicod
Replied by davicod on topic Re: k2_override problem
Thanks for your answer Peter
I have to check it again, because there is no tmpl folder inside the override package.
For example, for the k2_content override there is only one file inside the zip file
mod_k2_content/Default/default.php
and nothing else.
I think i have to do this manually, the override package doesnt seem to work correctly.
So if i got it right, i should copy the
root/modules/com_k2_content folder
inside the
my_template/html folder,
create copies of the Default folder and rename them
and finally copy the default.php file from the tmpl folder to the override folder?
Please verify this, it would be a great reference for other ppl here.
Now i see that i have the same problem with the whole component overrides, they work locally but not online.
This must be the same problem.
At least, css overrides work perfectly locallly and online :)
thanks
yorgos
I have to check it again, because there is no tmpl folder inside the override package.
For example, for the k2_content override there is only one file inside the zip file
mod_k2_content/Default/default.php
and nothing else.
I think i have to do this manually, the override package doesnt seem to work correctly.
So if i got it right, i should copy the
root/modules/com_k2_content folder
inside the
my_template/html folder,
create copies of the Default folder and rename them
and finally copy the default.php file from the tmpl folder to the override folder?
Please verify this, it would be a great reference for other ppl here.
Now i see that i have the same problem with the whole component overrides, they work locally but not online.
This must be the same problem.
At least, css overrides work perfectly locallly and online :)
thanks
yorgos
Please Log in or Create an account to join the conversation.
- Peter Grube
-
- Offline
- Elite Member
Less
More
- Posts: 241
12 years 5 months ago #107697
by Peter Grube
Replied by Peter Grube on topic Re: k2_override problem
Hi yorgos,
I think that for modules use the method you mentioned, as for overiding component / templates, I created
in the HTML folder.
Folder named com_k2 in this I copied / pasted the template folder from components / com_k2, I then copy / paste the default template folder & rename folder for overide template, I also created a image folder so that I can add / overide k2's template images. If your using css4k2, I create a css file inside each overide folder & name OverideTemplateName_style, so my html / com_k2 / templates folder looks like this
I know this works K2 Version 2.6.2 not sure about earlier versions.
I think that for modules use the method you mentioned, as for overiding component / templates, I created
in the HTML folder.
Folder named com_k2 in this I copied / pasted the template folder from components / com_k2, I then copy / paste the default template folder & rename folder for overide template, I also created a image folder so that I can add / overide k2's template images. If your using css4k2, I create a css file inside each overide folder & name OverideTemplateName_style, so my html / com_k2 / templates folder looks like this
Attachment not found
I know this works K2 Version 2.6.2 not sure about earlier versions.
Please Log in or Create an account to join the conversation.
- davicod
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 13
12 years 5 months ago #107698
by davicod
Replied by davicod on topic Re: k2_override problem
Hi Peter,
Regarding the modules override, neither this solution worked (doing what i said above, i couldnt even have overrides locally).
But i have another solution
I i made some copies of the /root/modules/mod_k2_content/tmpl/Default folder inside the same folder and i gave them some names to create different overrides.
Every override i have made so far works perfectlly locally and online.
I dont know if this is the best way, but it worked for me.
I would reallly appreciate if any of the mods could tell us if this is the right way.
I havent tried yet to do the same with the component override.
I ll try what you did, and i will tell you if it will work.
Thanks for your help
yorgos
Regarding the modules override, neither this solution worked (doing what i said above, i couldnt even have overrides locally).
But i have another solution
I i made some copies of the /root/modules/mod_k2_content/tmpl/Default folder inside the same folder and i gave them some names to create different overrides.
Every override i have made so far works perfectlly locally and online.
I dont know if this is the best way, but it worked for me.
I would reallly appreciate if any of the mods could tell us if this is the right way.
I havent tried yet to do the same with the component override.
I ll try what you did, and i will tell you if it will work.
Thanks for your help
yorgos
Please Log in or Create an account to join the conversation.