yet another blank page in codeigniter - codeigniter

Please be gentle with me as I've never used CI or EE before! Long term I'll probably rewrite the site in something I'm a bit more familiar with but I need to get it working as is for now.
I've taken on a site for someone who has fallen out with his old IT guy/host/webdesigner and I'm trying to move his site over to a new server. I don't know a huge amount about his old server other than I believe it's on centos with plesk, the new server is ubuntu 12.04 with virtualmin and has slightly newer versions of php5 and mysql.
The site consists of CI with an expressionengine app with minimee installed.
I've got the control panel working just fine however much of the rest of the site just gives me a blank page.
Here's what I've done:
copied all the files over and put the new db details in config/database.php
replaced all the references to the old system path in the db dump with the new path with sed then imported it.
changed the cache_path in minimee settings
updated config/config.php with the new path
set the debug to 1 in index.php
error logging threshold to 4 in config.php (requests for blank pages end with "XSS Filtering completed" repeated four times).
phpinfo shows show_errors is on.
nothing shows up in the apache error logs.
NB: this only seems to affects some pages, if I directly request other pages then they display as expected.
Here's the template for one of the pages that isn't rendering:
{embed="embeds/index"
title="{exp:query sql="SELECT cat_name FROM exp_categories WHERE cat_url_title = '{segment_2}' "}{cat_name}{if no_results}Equipment{/if}{/exp:query}"
}
<div class="block-quarter">
<h2>
<a href="/{segment_1}" class="icon {segment_1}" title="{segment_1}">{segment_1}
</a>
</h2>
{embed="embeds/category-nav" channel="equipment" path="info" group_id="2"}
</div>
<div class="block-3quarter content">
<ul class="content-header">
<li class="first">
Equipment
{if '{segment_2}' != ''}
{exp:query sql="SELECT cat_name FROM exp_categories WHERE cat_url_title = '{segment_2}' "}
{if no_results}{/if}>
</li>
<li>
<a href="/equipment/{segment_2}" title="">{cat_name}
</a>
{/exp:query}
{/if}
</li>
</ul>
{exp:query sql="SELECT cat_id FROM exp_categories WHERE cat_url_title = '{segment_2}' "}
{embed="embeds/list-equipment" cat_id="{cat_id}"}
{if no_results}
{embed="embeds/list-equipment"}
{/if}
{/exp:query}
</div>
{embed="embeds/footer"}
Anyone got any suggestions?
My feeling is that I've missed an reference to the old system path somewhere but for the life of me I can't see where. I've grep'ed the database dump I'm using and searched all the files that make up the site and found nothing.
EDIT:
Just thought I should add a template for a page that does render
{exp:channel:entries channel="company" disable="member_data|pagination" dynamic="yes" cache="yes" limit="1"}
{if no_results}{redirect="company"}{/if}
{embed="embeds/index"
title="{title} {if segment_2} | Company{/if}"
description="{exp:eehive_hacksaw words="25"}{page_content}{/exp:eehive_hacksaw}"}
<div class="block-quarter">
<h2>
<a href="/{segment_1}" class="icon {segment_1}" title="{segment_1}">{segment_1}
</a>
</h2>
{embed="embeds/side-nav" entry_id="12" title="Company" channel="company"}
</div>
<div class="block-3quarter content">
{embed="embeds/breadcrumbs"}
{image-placement}
<h3>{title}</h3>
<div id="content">
{page_content}
</div>
</div><!-- END Content -->
{embed="embeds/footer"}
{/exp:channel:entries}
EDIT2:
here's the end of the CI log for a blank page:
DEBUG - 2013-08-05 19:07:56 --> Api class already loaded. Second attempt ignored.
DEBUG - 2013-08-05 19:07:56 --> Api_channel_fields class already loaded. Second attempt ignored.
DEBUG - 2013-08-05 19:07:56 --> Typography class already loaded. Second attempt ignored.
DEBUG - 2013-08-05 19:07:56 --> XSS Filtering completed
DEBUG - 2013-08-05 19:07:56 --> XSS Filtering completed
DEBUG - 2013-08-05 19:07:56 --> XSS Filtering completed
DEBUG - 2013-08-05 19:07:56 --> XSS Filtering completed

sorry guys I feel like a complete tool
I'd forgotten to make sure gd was installed.
Now it's installed everything works. I suppose I was right in thinking it was something simple, I was just wrong about what simple thing was causing the problem!
Thanks for the help everyone!

Related

Magento main content blocks. Removing wrapping <p> tags

I'm doing maintenance work on a magento site for a client and I'm trying to w3c validate the site.
The problem is that the blocks in the main column are all being wrapped with a <p> tag.
<div class="col-main last">
<div class="std">
<p>
<div class="flexslider">
...
I tried using debug_backtrace and managed to locate the problem to originate somewhere between calls to the Abstract class (app/code/core/Mage/Core/Block/Abstract.php). Maybe there is some sort of filter that applies the <p> tag?
I've not previously worked with magento so any help towards debugging the issue would be greatly appreciated.
Where should I start looking?
If it's only for cms pages then the <p> comes from the content of the page. Edit the page in CMS->Pages and replace the tag with a <div>.

Navbar not initializing in kendo ui mobile webpage

for some reason this navbar is not rendering correctly on the browser :
<header data-role="header">
<div id="navbar-personalize" data-role="navbar" class="my-navbar">
<div data-align="left">
<img src="../../Images/dashboard6.png" alt="Dashboard"/>
</div>
<span data-role="view-title">Cart Summary</span>
<div data-align="right">
<a href="#merchandise-otherorders-view">
<img src="../../Images/whoelse6.png" alt="Who else is going?"/>
</a>
</div>
</div>
</header>
I have other navbars just like this one all around my index file, and they all work fine, except for this one. It seems that KendoUI isn't initializing it all. By inspecting the code I can see that it's missing all of kendo's styling (like "km-navbar" and such).
It may have to do with the fact that I'm defining this header in each one of the views inside the file, instead of defining it in the app layout, but for some reason defining it inside the app layout doesn't work for me, it simply doesn't render at all.
I'm out of ideas, can somebody help me?
Thanks
I had this problem today. Make sure that kendo.mobile.min.js is included on your page. The docs don't say to put it in, but adding that made it work for me.

Adblock Plus for Chrome blocking links in H3 but not H2 - Any way around that?

I have a site where Adblock Plus for Chrome is blocking links in H3 but not H2 elements. It seems strange I could just change them to H2 and it would work. But I have a lot of sites that have this potential issue. Is there a way way around that issue?
Why would H3 be an ad threat but not H2?
Here is some test code of this in action:
<div id="topCenterBlock">
<h3>A test headline </h3>
<div class="source">Stack Overflow</div>
<br>
<div class="source"> 2:30 P.M. ET </div>
<p>Test view of a extract from the article that would display under a link</p>
</div>
They would only be the default from install. I only installed the product so I could see the behavior, which one of our users complained about. I can get a snap later to show but it's just the set out of the box.

Where can we modify the default links of the footer in Magento?

I want to get rid of the links in the footer of my website, someone started the dev of that website and left, now I can't modify it, because when I'm in the footer.phtml i can see that code :
<!-- Footer -->
<div id="footer">
<ul>
<li><?php echo $this->getCopyright(); ?></li>
</ul>
<?php echo Mage::getModel('core/variable')->loadByCode('footer_navigation')->getValue('html'); ?>
<div class="cl"> </div>
</div>
<!-- /Footer -->
I can't find the place where that class is looking for the links Mage::getModel('core/variable')->loadByCode('footer_navigation')->getValue('html')
I've been looking in catalog.xml where I found <reference name="footer_links"> but if I delet the code inside, nothing happen, it doesn't seem to be linked in any way with that.
I got the same problem in my menu where I see that class I don't understand : $categories = $this->renderCategoriesMenuHtmlCustom2(0, 'level-top'); Where does that refer too ?
Thanks :)
Login to your admin panel and go to System->Custom Variables. You should find the footer links there. You can remove the links through here (by deleting the HTML and plain-text fields), or by taking out the piece of code that loads the footer links variable (the line that calls loadByCode('footer_navigation')).
You can also delete the variable through the admin panel, but if you do this, you should also remove the code that calls it; it won't crash, but it can lead to confusion down the road.

JQ Touch and AJAX

I am a little new to this so apologies if I am a little vaugue but I will do my best.
I am attempting to create an iphone friendly version of a site using JQtouch. I understand that normally this would be done all in one HTML file with pages seperated by DIV's. However, I am wanting to load the content from exisitng pages of a website.
The next part to the problem is that my iphone.html page does not sit in the same directory as my current website, so the normal behaviour of JQtouch doesnt seem to work.
So far I have set up a page as follows:
<div id="home">
<div class="toolbar">
<h1>Title</h1></div>
<ul class="rounded">
<li class="arrow"> HOME</li>
<li class="arrow"> ABOUT US</li>
<li class="arrow"> GNWR</li>
<li class="arrow"> GNER</li>
<li class="arrow"> NEWS</li>
<li class="arrow"> FAQS</li>
<li class="arrow"> CONTACT</li>
</ul>
</div>
<div id="content"></div>
<div id="about"></div>
<div id="journal"></div>
<div id="faqs"></div>
<div id="contact"></div>
</body>
</html>
I then have :
<script>
$(document).ready(function(){
$('#content').load('http://www.mysite.co.uk' + ' #content');
$('#about').load('http://www.mysite.co.uk/about' + ' #content');
}
</script>
This loads the content I am after and the page animations work fine. The only problem is that a couple of links exist in the content I am loading and when clicked they obviously dont work.
Is there a way I can check the href of a link when clicked and if it points to www.mysite.co.uk/about change it to point to #about and force it to navigate there?
Hope this makes sense if you need more info let me know.
Regards
Chris.
You are asking quite a few questions inside a single question... You should really break them up into several questions. It's easier for people to answer. Anyways, I'll give it a shot.
First of all, you don't have to have all contents in one html; you can load contents via AJAX. See the AJAX > "GET Example" in this demo, as well as the page content loaded via AJAX.
As far as I know, the pages you want to load do not have to be in the same directory structure. The pages you want to load via AJAX need to contain a valid jQTouch page, i.e. the whole page is enclosed in a <div>.
Is there a way I can check the href of
a link when clicked and if it points
to www.mysite.co.uk/about change it to
point to #about and force it to
navigate there?
If I understand you correctly, you essentially want to replace all the links to www.mysite.co.uk/about with #about. This has to be done with jQuery:
$('a[href="http://www.mysite.co.uk/about"]').attr('href', '#about');
You may want to do that when each page loads:
$(document).ready(function(e){
$('body>div').bind('pageAnimationEnd', function(event, info){
$('a[href="http://www.mysite.co.uk/about"]').attr('href', '#about');
})
});

Resources