file manager is not working with custom theme
Permalink
I am new to concrete5 and this close to giving up on it altogether because everytime I think I've got things working it all breaks again. :(
I built a site layout the way I normally do (with html and css), then went through the process of following the tutorials to turn that into a theme. All seemed to be good but now as I try to create editable areas within my layout for concrete 5 I'm running into issue after issue and getting very frustrated.
I've troubleshooted my way through figuring out where my css was conflicting with the c5 interface and staighted that all out for the most part (aside from a small problem with me fixed header creating chunks on top of the add block toolbar when I open it), but right now my big issue is that I CANNOT ADD IMAGES.
I can upload images to file manager no problem, but when I try to use them, nothing happens.
I've tried putting in an image block and putting in a slider block (both from the default blocks provided). I click to add the image, and the file manager pops up but I cannot for the life of me actually select the image from file manager! I click an image thumbnail and nothing happen. I click the check box for the image I want and try EVERYTHING in the drop down menu for images selected and for all of them nothing happens!
If I set back to the default elemental theme, it all works find and all I have to do is click the image thumbnail and boom it goes straight in but if I try it within my own custom them, *crickets* absolutely nothing.
I'm sure the answer is probably simple, but trying to search the forums to find it is getting me nowhere. I'm just about ready to abandon concrete5 and go to making this a wordpress theme and run the site through wordpress instead which I don't want to do but the whole point of trying to do this through concrete5 was so that I'd have an easy interface for clients to make changes to the site when needed so that requires being able to get the concrete5 interface to place nice with my code.
Help?
I built a site layout the way I normally do (with html and css), then went through the process of following the tutorials to turn that into a theme. All seemed to be good but now as I try to create editable areas within my layout for concrete 5 I'm running into issue after issue and getting very frustrated.
I've troubleshooted my way through figuring out where my css was conflicting with the c5 interface and staighted that all out for the most part (aside from a small problem with me fixed header creating chunks on top of the add block toolbar when I open it), but right now my big issue is that I CANNOT ADD IMAGES.
I can upload images to file manager no problem, but when I try to use them, nothing happens.
I've tried putting in an image block and putting in a slider block (both from the default blocks provided). I click to add the image, and the file manager pops up but I cannot for the life of me actually select the image from file manager! I click an image thumbnail and nothing happen. I click the check box for the image I want and try EVERYTHING in the drop down menu for images selected and for all of them nothing happens!
If I set back to the default elemental theme, it all works find and all I have to do is click the image thumbnail and boom it goes straight in but if I try it within my own custom them, *crickets* absolutely nothing.
I'm sure the answer is probably simple, but trying to search the forums to find it is getting me nowhere. I'm just about ready to abandon concrete5 and go to making this a wordpress theme and run the site through wordpress instead which I don't want to do but the whole point of trying to do this through concrete5 was so that I'd have an easy interface for clients to make changes to the site when needed so that requires being able to get the concrete5 interface to place nice with my code.
Help?
I'm trying my best to stick it out and deal with the pains of the learning curve because I'm sure it will be worth it in the end. C5 looks like it has the potential for a much better environment then WordPress (which seems to be what most people are using). But it definitely is a learning curve. Doesn't help that when I search for information a lot of what I find is for older versions.
I've taken a screen cap of the page, and what it showed with inspect. Looks like there are some errors. I can't give you a link to the page because unfortunately I'm running it all in a localhost environment right now.(Want to get it all built before figuring out who to go with for a webhosting package. Which probably means more fun later when I try to migrate it all from localhost to live server).
I've fairly new to working with php and jquery aside from just inserting bits from elsewhere into my pages, so I don't doubt that's probably where the issue is.
I just added a page_theme.php to the theme (then uninstalled/reinstalled) in hopes that would correct this probably but it didn't. Not sure I've got it setup right or what all I needed to include in it. I did have the page loading jquery on it's own before I added that because it wasn't seeming to load it otherwise. So I've probably created more conflicts.
My page header code:
I'm sure I need to take the jquery line out there. I'm just not sure how to get it loading the jquery when I do as when I took it out before (before I created the page_theme.php) then when I logged out and viewed the page none of the javascript worked so i put it back in.
This is what I have in my page_theme.php right now:
I copied most of that from the page_theme.php of another theme. I wasn't sure what all I needed to put in. I'm not really using the bootstrap framework right now. I have my page set up withing the w3.css for grids and it's all broken into sections in the html then I'm just adding c5 editable areas into the html with my sections instead of creating the sections from within the concrete5 environment.
I am very much a beginner web developer in the first place and learning a lot of this as I go. I've jumped into the deep water a bit by jumping into using a cms like this when I've mostly only done small html/css based projects before and this is the first time I'm designing something for someone else to edit and use.
Thanks for responding so quickly.
Also, I'm attaching a second screen cap of the small issue i'm having with my header messing up the block box. I'm not really concerned about this right now because it's just annoying for cosmetic reasons, but I will want to figure it out later. I've narrowed it down to being caused by this tiny bit of my css, but am not sure what to do with that knowledge.
If I take out the height, then it shows up perfectly fine (but then my shrinking header no longer works right.) *shrug* this is a very tiny inconsequential thing right now though compared to my problem of not being able to use the file manager to insert pictures and such.
I've taken a screen cap of the page, and what it showed with inspect. Looks like there are some errors. I can't give you a link to the page because unfortunately I'm running it all in a localhost environment right now.(Want to get it all built before figuring out who to go with for a webhosting package. Which probably means more fun later when I try to migrate it all from localhost to live server).
I've fairly new to working with php and jquery aside from just inserting bits from elsewhere into my pages, so I don't doubt that's probably where the issue is.
I just added a page_theme.php to the theme (then uninstalled/reinstalled) in hopes that would correct this probably but it didn't. Not sure I've got it setup right or what all I needed to include in it. I did have the page loading jquery on it's own before I added that because it wasn't seeming to load it otherwise. So I've probably created more conflicts.
My page header code:
<?php defined('C5_EXECUTE') or die("Access Denied."); ?> <!DOCTYPE html> <html lang="<?php echo Localization::activeLanguage()?>"> <head> <?=Loader::element('header_required'); ?> <!-- Stylesheets --> <link rel="stylesheet" type="text/css" href="<?php echo $view->getThemePath()?>/css/w3.css"> <link rel="stylesheet" type="text/css" href="<?php echo $view->getThemePath()?>/css/main.css"> <!-- Javascript --> <script src="<?php echo $view->getThemePath()?>/js/jquery-3.1.0.min.js"></script> <!-- write script to toggle class on scroll --> <script> $(window).scroll(function() { if ($(this).scrollTop() > 150){ $('header').addClass("shrink");
Viewing 15 lines of 26 lines. View entire code block.
I'm sure I need to take the jquery line out there. I'm just not sure how to get it loading the jquery when I do as when I took it out before (before I created the page_theme.php) then when I logged out and viewed the page none of the javascript worked so i put it back in.
This is what I have in my page_theme.php right now:
<?php namespace Application\theme\Cornerstone; use Concrete\core\page\theme\theme; class PageTheme extends theme { public function registerAssets() { //$this->providesAsset('javascript', 'bootstrap/*'); $this->providesAsset('css', 'bootstrap/*'); $this->providesAsset('css', 'blocks/form'); $this->providesAsset('css', 'blocks/social_links'); $this->providesAsset('css', 'blocks/share_this_page'); $this->providesAsset('css', 'blocks/feature'); $this->providesAsset('css', 'blocks/testimonial'); $this->providesAsset('css', 'blocks/date_navigation'); $this->providesAsset('css', 'blocks/topic_list');
Viewing 15 lines of 39 lines. View entire code block.
I copied most of that from the page_theme.php of another theme. I wasn't sure what all I needed to put in. I'm not really using the bootstrap framework right now. I have my page set up withing the w3.css for grids and it's all broken into sections in the html then I'm just adding c5 editable areas into the html with my sections instead of creating the sections from within the concrete5 environment.
I am very much a beginner web developer in the first place and learning a lot of this as I go. I've jumped into the deep water a bit by jumping into using a cms like this when I've mostly only done small html/css based projects before and this is the first time I'm designing something for someone else to edit and use.
Thanks for responding so quickly.
Also, I'm attaching a second screen cap of the small issue i'm having with my header messing up the block box. I'm not really concerned about this right now because it's just annoying for cosmetic reasons, but I will want to figure it out later. I've narrowed it down to being caused by this tiny bit of my css, but am not sure what to do with that knowledge.
header { width: 100%; height: 150px; position: fixed;
If I take out the height, then it shows up perfectly fine (but then my shrinking header no longer works right.) *shrug* this is a very tiny inconsequential thing right now though compared to my problem of not being able to use the file manager to insert pictures and such.
Hello,
just 3 things:
1- yes you are right you have to remove that jquery loading line
2 your code call the required header is not correct.
you have
when you should have
And do the same for the required footer
This piece of code (both header and footer), once corrected, will load jquery automatically and all the javascript and css Concrete5 requires to work
3- could you show us a screenshot of your errors (like the one you already provided) but when you are trying to select an image from the file manager like you described?
just 3 things:
1- yes you are right you have to remove that jquery loading line
2 your code call the required header is not correct.
you have
<?=Loader::element('header_required'); ?>
when you should have
<?php Loader::element('header_required'); ?>
And do the same for the required footer
This piece of code (both header and footer), once corrected, will load jquery automatically and all the javascript and css Concrete5 requires to work
3- could you show us a screenshot of your errors (like the one you already provided) but when you are trying to select an image from the file manager like you described?
Thank you. That one little change seems to have fixed adding images. They now work. Now I just need to figure out why my header seems to through chunks of white over the block panel but at least that's not stopping anything from working.
this sound like a CSS or a Javascript conflict with your theme.
If you click "inspect" by right clicking on the page and then go to Console, do you see any errors?
Also, can you provide a link to your page so we can have a look?
You need to make sure there are no errors or conflicts with concrete5 interface for things to work. I understand it's hard if this is your first theme with concrete5, but trust me it's a nice CMS when you get used to it and the community is friendly :)
Jordi