Core Themes Lost

The way for a newbie to learn is to play. But sometimes there are unexpected consequences.

I removed the core themes and now they don't show up in the dashboard "Themes and Pages". Apparently, the dashboard only looks at the root packages and themes (user directories which I think are called "local scope" versus "concrete scope"). I realize I can copy the existing core themes to my root themes directory and violá they would appear.
The question, however, is there a way to reset themes so the core themes re-appear as installable themes in the dashboard?

PS - I have watched several videos and read some documentation, but of course not all. Any suggestions referring to current documentation related to this question is welcomed too.

View Replies:
nteaviation replied on at Permalink Reply
Take your original zip file of Concrete5 and extract out the /concrete/themes directory. Using that folder, just overwrite the /concrete/themes directory on your website. That should restore your default core themes. Even easier is to reload the entire /concrete directory (core files). This is really handy when you "bork" things up really bad. That make sense?
bhat replied on at Permalink Reply
Thanks. The /concrete5/themes directory is 100% the same, uninstalling a theme from dashboard doesn't delete anything. I am sure replacing the entire /concrete directory may work unless a database table is involved? It just appears that the "Pages and Themes" option in dashboard only looks at the user level themes and packages not at the core themes (after original install of course). My simple solution is to just copy the theme name from /concrete/themes to myrootlevel/themes. That will work fine.

I was just wondering if there was some sort of reset in Dashboard so the original core themes would show up again. Your advice is good. The best thing a newbie can do is backup the files and database often. As a newbie, this is my time for mistakes!
nteaviation replied on at Permalink Reply
Did you try clearing the C5 cache in the Dashboard/Sitewide Settings/General tab?
bhat replied on at Permalink Reply
Thanks again for your answer. I did not think about the cache. That did bring to mind some other ideas like looking at the site map system files, etc. But once again the dashboard did not provide a solution.

I did solve the problem by inserted records into table 'PagesThemes'. I don't exactly know how that works but I looked at another install and saw those records. So I just copied a record and inserted the fields into localhost and YUP the themes show up again! If I was guessing I think the value pkgID has something to do with what is displayed. It is the only field with a common value of zero. Consider this solved but I would not suggest playing with the database. As you put it... it is a good way to 'bork' things up. I consider my first week as experimental so I'm still willing to start over. That is probably not a good idea for someone with a specific goal in mind. I tried Drupal7 for 3 months and was confused by the constantly changing environment. This is my test time for Concrete5 and so far it is looking great!!!
nteaviation replied on at Permalink Reply
SUPER! Good catch! It sounds like you have a very good programming background and hope you will love C5/MVC/OOP once you get used to it. Coming from a "procedural coding" background, I still have trouble "getting my head around" all this OOP stuff. This is a great community, full of people willing to help and "itching" for an opportunity for a good challenge.

femiji replied on at Permalink Reply

Here is the initial data for the PagetThemes table

INSERT INTO PageThemes VALUES(1,'default','Plain Yogurt\n','Plain Yogurt is Concrete\'s default theme.',0)
 ,(2,'greensalad','Green Salad Theme\n','This is Concrete\'s Green Salad site theme.',0)
 ,(3,'dark_chocolate','Dark Chocolate\n','Dark Chocolate is Concrete\'s default theme in black.',0);

I hope it helps someone
fizixgeek replied on at Permalink Reply
That was great. I had the same problem (Dark Chocolate present in the file system, but not visible on the dashboard).

INSERT INTO PageThemes VALUES(3,'dark_chocolate','Dark Chocolate\n',
'Dark Chocolate is Concrete\'s default theme in black.',0)

did the trick.
jezmck replied on at Permalink Reply
Can someone please post the original contents for this table in Concrete 5.7?
morganstar replied on at Permalink Reply
I don't have the exact wording for the description from the original table, but I found with that this works to restore the "Elemental" theme to the Dashboard:

INSERT INTO `PageThemes` (
`pThemeID` ,
`pThemeHandle` ,
`pThemeName` ,
`pThemeDescription` ,
`pkgID` ,
'1',  'elemental',  'Elemental',  'Default core Concrete5 theme.',  '0',  '0'