Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Preview and Blog

edited December 2010 in Modules
Sorry not sure which category to put this into. I have been working with the system for a few weeks now and have a couple of questions I can't seem to nail down.

1. Preview doesn't seem to be working I just have a blank white area. Is there documentation on how to set this up or something special I need to make it work?

2. On the Blog the page title seems strange and I am wondering if I have it setup correctly. I am using the fuel_var('page_title') for the title is that correct? When I go to an archive page, say for this month, I just get span tags between the title tags. The category page seems to use the uri as the title and not the category name. Hopefully those examples will help. If I come across others I will make sure to post them. Did I set this up correctly?

Any help would be much appreciated.

Thanks,
Mike

Comments

  • edited 11:36AM
    Couple quick questions to help diagnose the problem:

    1. Which GitHub branch are you using? master or 0.91?
    2. For the preview, are you referring to the MarkItUp preview (checkbox icon)
    3. Blog page titles can be automatically generated using the page_title method on the fuel_blog object. To do that you can use something like below. Are you using something like this for inserting blog page title?<?php if (!empty($is_blog)) : ?> <title><?php echo $CI->fuel_blog->page_title($page_title, ' : ', 'right')?></title> <?php else : ?> <title><?php echo fuel_var('page_title', '')?></title> <?php endif ?>
  • Sorry for not including the details ahead of time.

    1. I am using the master.
    2. The preview I was referring to was the MarkItUp checkbox icon preview ... is there a different preview? Or is that the one I should be using?
    3. Thank you on the blog title that makes sense I will try it out.
  • edited 11:36AM
    I think I saw your issue and posted some fixes onto GitHub. The problem seemed to appear in Firefox but not in Safari and it had to do with the javascript being rendered by the safe_mailto() function used in the _blocks/header.php from the master version on GitHub.

    As and FYI, the application/views/_fuel_preview.php is what is used to create your preview. The variable 'body' is what get's passed to the _fuel_preview.php view file from MarkItUp. By default, FUEL just uses the main layout file for previewing (which has the 'body' variable in it to merge in).

    So if you are having problems with preview, it may be that there is something in your layout file that is causing it n FireFox and if so, just edit the _fuel_preview.php file to suite your needs. Hope that helps.
  • I am using the master version and still can't seem to get the preview to work in FF or Safari. It doesn't look like the preview iframe is even being pointed to a page. I took everything out of the _fuel_preview.php and just put the word HERE in it and didn't even see that. Is there route or some I have to setup? I wish there was a better way I could trouble shoot this for you but I can't seem to even locate where the issue might be. Thoughts?
  • edited 11:36AM
    Do you have FireBug installed...? If so, do you see any content coming through after you click the checkmark (it posts the data of the field to the /fuel/modules/controllers/preview controller and uses the _fuel_preview.php file to render the output).
  • Yes I have firebug and what I am seeing is the following. However I think the html that is coming through is being added by firefox because that looks like what it puts in when there isn't a page. What else can I do to test for you?

  • edited 11:36AM
    It doesn't look like the example you pasted in above came through. Try putting 'code' HTML tags around it.
  • Sorry about that.

    <iframe class="markItUpPreviewFrame"><html><head><title></title></head><body></body></html></iframe>
  • edited 11:36AM
    I'll email you directly so I can attach an image.
  • edited January 2011
    It appears the problem occurred because the URI_PROTOCOL being used was QUERY_STRING and the preview page has query string parameters passed to it which was causing an "The URI you submitted has disallowed characters." error to be displayed. Changing the .htaccess from:
    RewriteRule .* index.php/$0 [L]
    TO
    RewriteRule .* index.php?/$0 [L]
    Seemed to fix the problem.
Sign In or Register to comment.