Tweaking packaged Themes. What to do?
Permalink
Hi guys.
I recently purchased a packaged theme off the marketplace. Things have been fine and I have been bouncing questions off of the developer with pretty good feedback.
However there seems to be a rather major issue now.
First thing I did when I got the packaged theme was to make a duplicate of it and stick it in my /applications folder. I then changed the namespace of "page_theme.php" to read "Application\Theme\NameOfTheme" Great! I started making duplicate copies of blocks provided and creating my own templates and that works great as well. Actually I did not notice any issues at all in the development stages and chrome dev tools didn't spit any errors. My templates, added classes and general tweaks looked great and I was ready make my page viewable outside of maintenance mode. Once I switched the caches back on, most everything seemed to break down and my hard work seemed gone.
This is very strange to me as with caches turned to edit mode for all things looked as expected even when signed out of C5.
Please if anyone has any idea as to what is going on, please help me out. I have found it very hard to learn C5 as I'm a novice user and don't think C5 is very well documented for those of us who like to tweak with templates and such but are not expert users.
Thanks in advance for any responses to my call for help.
Always good intentions I just want to learn.
Cheers,
Bjorn
I recently purchased a packaged theme off the marketplace. Things have been fine and I have been bouncing questions off of the developer with pretty good feedback.
However there seems to be a rather major issue now.
First thing I did when I got the packaged theme was to make a duplicate of it and stick it in my /applications folder. I then changed the namespace of "page_theme.php" to read "Application\Theme\NameOfTheme" Great! I started making duplicate copies of blocks provided and creating my own templates and that works great as well. Actually I did not notice any issues at all in the development stages and chrome dev tools didn't spit any errors. My templates, added classes and general tweaks looked great and I was ready make my page viewable outside of maintenance mode. Once I switched the caches back on, most everything seemed to break down and my hard work seemed gone.
This is very strange to me as with caches turned to edit mode for all things looked as expected even when signed out of C5.
Please if anyone has any idea as to what is going on, please help me out. I have found it very hard to learn C5 as I'm a novice user and don't think C5 is very well documented for those of us who like to tweak with templates and such but are not expert users.
Thanks in advance for any responses to my call for help.
Always good intentions I just want to learn.
Cheers,
Bjorn
Hi Bjorn,
"Once I switched the caches back on, most everything seemed to break down and my hard work seemed gone."
"If I have all the caches turned on and am logged in, all good as well. Once I'm logged out with caches on, it all degrades again."
Can you offer more specific details about what is happening?
Do you have any errors in your browser console?
Have you checked the concrete5 logs for errors?
Dashboard > Reports > Logs
Is there a reason why you moved the theme and blocks to the application folder?
"Once I switched the caches back on, most everything seemed to break down and my hard work seemed gone."
"If I have all the caches turned on and am logged in, all good as well. Once I'm logged out with caches on, it all degrades again."
Can you offer more specific details about what is happening?
Do you have any errors in your browser console?
Have you checked the concrete5 logs for errors?
Dashboard > Reports > Logs
Is there a reason why you moved the theme and blocks to the application folder?
Narrowed the issue down to block caching.
When block caching is turned on and I'm logged in the block reflects my template changes and everything is good.
When block caching is turned on and I log out to view the live site the block does not reflect my template and css changes.
No errors in the browser console at all.
Have not checked the C5 log yet.
I moved the theme and blocks over to the application folder so that when the package is updated I can avoid losing my changes. If this is not good practice and there is a better way, I'd love to know about it. Smart, simple and non-destructive workflow would be ideal.
Thanks KD so much for your early response.
Bjorn
When block caching is turned on and I'm logged in the block reflects my template changes and everything is good.
When block caching is turned on and I log out to view the live site the block does not reflect my template and css changes.
No errors in the browser console at all.
Have not checked the C5 log yet.
I moved the theme and blocks over to the application folder so that when the package is updated I can avoid losing my changes. If this is not good practice and there is a better way, I'd love to know about it. Smart, simple and non-destructive workflow would be ideal.
Thanks KD so much for your early response.
Bjorn
@Bjorn
Off the top of my head I am not sure what is going on.
There are a couple options If someone else doesn't post a solution:
- You can zip your theme and block files and PM them to me. This will allow me to test them directly.
- You can make a guest admin account for me to use to see what is going on firsthand.
Off the top of my head I am not sure what is going on.
There are a couple options If someone else doesn't post a solution:
- You can zip your theme and block files and PM them to me. This will allow me to test them directly.
- You can make a guest admin account for me to use to see what is going on firsthand.
KD,
Seems that questioning my workflow made me question it myself . For a test, I copied the template from my application directory to the packaged theme directory and loaded that one instead. It worked without issue!
Have you a suggestion for good workflow practice? The setup I had going where I had a mirror copy of the theme was working great for all overrides except for this one block. Seems a good workflow if I could clean up the bugs some how. Any ideas? It's probably a clash of duplicate css calls for the block but I'm not sure. Probably an edit to the page_theme.php file to fix it up.
I'd pour you a beer for helping me out but instead a huge thanks man.
Seems that questioning my workflow made me question it myself . For a test, I copied the template from my application directory to the packaged theme directory and loaded that one instead. It worked without issue!
Have you a suggestion for good workflow practice? The setup I had going where I had a mirror copy of the theme was working great for all overrides except for this one block. Seems a good workflow if I could clean up the bugs some how. Any ideas? It's probably a clash of duplicate css calls for the block but I'm not sure. Probably an edit to the page_theme.php file to fix it up.
I'd pour you a beer for helping me out but instead a huge thanks man.
well it looks as if the same issue is back now. Thought it was working but just before I closed my computer I noticed same behavior again.
No log output nothing to lead me to what it could be.
No log output nothing to lead me to what it could be.
@Bjorn
Any progress?
If not, you can zip up your files and PM them to me.
I am not sure about the best way to handle customizing a marketplace theme and protecting the changes from being overwritten during an upgrade. It is a good question and I would be curious to know what approaches people are using.
Any progress?
If not, you can zip up your files and PM them to me.
I am not sure about the best way to handle customizing a marketplace theme and protecting the changes from being overwritten during an upgrade. It is a good question and I would be curious to know what approaches people are using.
None. I can see these same questions pop up all over the forum. Like this discussion of late:
"Cache and add-ons on C5.7" but the answers are very vague.
I completely ruined my setup in trying to fix it and stepped away to other non-web projects that I actually have control over.
Like you said, it is a very good question.. What is the procedure to correctly override a packaged theme? From the documentation of 5.7 I can surmise that the /application folder is a good area to override concrete core files like blocks, single pages, page templates and other goodies. It does not specify themes in packages so it's anyones guess. I did copy the entire theme into the application dir and did not change the name. I did change the page_theme.php's namespace and this worked well. Except for the crazy cache problem that made me second guess and reconstruct to work directly in the packaged theme. But this all does not really help when it comes to a packaged theme update does it. I mean even if you do have a local copy, one does not know what the developer of the theme actually changed in the version-up so even though you had a nice local version in the application dir that is not overridden you cant be sure it's all going to work well.
It's very difficult to explain because there are a lot of what-if's here and I believe C5 should come up with some real standards so us guys who are not clever enough can figure things out in a logical way.
Once my frustration subsides, I'll get the site back to where the issues arise and give you those files to see if you can figure out the problem.
Cheers,
Bjorn
"Cache and add-ons on C5.7" but the answers are very vague.
I completely ruined my setup in trying to fix it and stepped away to other non-web projects that I actually have control over.
Like you said, it is a very good question.. What is the procedure to correctly override a packaged theme? From the documentation of 5.7 I can surmise that the /application folder is a good area to override concrete core files like blocks, single pages, page templates and other goodies. It does not specify themes in packages so it's anyones guess. I did copy the entire theme into the application dir and did not change the name. I did change the page_theme.php's namespace and this worked well. Except for the crazy cache problem that made me second guess and reconstruct to work directly in the packaged theme. But this all does not really help when it comes to a packaged theme update does it. I mean even if you do have a local copy, one does not know what the developer of the theme actually changed in the version-up so even though you had a nice local version in the application dir that is not overridden you cant be sure it's all going to work well.
It's very difficult to explain because there are a lot of what-if's here and I believe C5 should come up with some real standards so us guys who are not clever enough can figure things out in a logical way.
Once my frustration subsides, I'll get the site back to where the issues arise and give you those files to see if you can figure out the problem.
Cheers,
Bjorn
If I have all the caches turned on and am logged in, all good as well. Once I'm logged out with caches on, it all degrades again.
Thanks