Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Forum: Hacks
    In reply to: Code scanner/reviewer
    Thread Starter firstain

    (@firstain)

    Hi,

    One of the suggestions for the plugin:

    RECOMMENDED: bloginfo(‘template_directory’) was found in the file xxx.php. Use get_template_directory_uri() instead.

    I followed this recommendation and as a result my theme was messed up.

    For example:

    Previously it was this:

    <img src='<?php bloginfo(‘template_directory’); ?>/images/feed.png’ alt=’Subscribe to our R…

    This showed the rss icon…

    When i used this:

    <img src='<?php get_template_directory_uri(); ?>/images/feed.png’ alt=’Subscribe to our R…

    The rss icon wouldn’t show.

    Whats the problem? Is the plugin suggesting me a wrong tag?

    Forum: Hacks
    In reply to: Code scanner/reviewer
    Thread Starter firstain

    (@firstain)

    Hi,

    thanks for the reply again.

    In the meanwhile, i tried the 3rd link you gave above (Plugin by Pross).

    I ran that plugin and it gave me a plethora of warnings. Most of them were use of depreciated tags like:

    It said:

    Used: bloginfo(‘home’)
    Instead use: bloginfo(‘url’)

    Something like those…

    But the first one was something like this:
    WP_DEBUG is not enabled…enable it first..

    What is that and how to do that? I referred the codex but couldn’t quite understand. Is it necessary?

    And lastly, the warnings it gave…is there an automatic way to correct them or i’ll have to manually replace the depreciated tags on each and every file?

    There were few ‘special characters’ also in my coding…should i remove them?

    Forum: Hacks
    In reply to: Code scanner/reviewer
    Thread Starter firstain

    (@firstain)

    Thanks…

    but W3 validator is showing this error for each and every .php file i upload:

    Sorry, I am unable to validate this document because its content type is application/octet-stream, which is not currently supported by this service.
    The Content-Type header is sent by your web server (or web browser if you use the file upload interface) and depends on its configuration. Commonly, web servers will have a mapping of filename extensions (such as “.html”) to MIME Content-Type values (such as text/html).
    That you received this message can mean that your server is not configured correctly, that your file does not have the correct filename extension, or that you are attempting to validate a file type that we do not support yet. In the latter case you should let us know that you need us to support that content type (please include all relevant details, including the URL to the standards document defining the content type) using the instructions on the Feedback Page.

    For css file it replaced “application/octet-stream” with “text/css”

    What could be the issue here?

    Thread Starter firstain

    (@firstain)

    One more thing…

    All the posts listed in my theme are working perfectly, apart from one post: https://localhost/wordpress/2008/09/05/readability-test/

    It was working properly before but now, when i open that page, only the header file loads, breadcrumb is broken, and no sidebar and footer. It shows the following error:

    Catchable fatal error: Object of class WP_Error could not be converted to string in C:\xampp\htdocs\wordpress\wp-content\themes\Xpress\functions.php on line 385

    Line 385 on my functions.php is this:

    echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');

    This line 385 is the code for breadcrumbs. What could be the error?

    Is this breadcrumb issue on only 1 particular post problem in any way related to my search form problem?

    Please help!
    Thanks!

    Thread Starter firstain

    (@firstain)

    As far as i’m concerned, i have no ‘improperly closed PHP tags’and no ‘non-printable characters’ anywhere in my template files.

    But still, just for reassurance, how do i check for the above mentioned errors? Obviously i can’t go through so much of codes in all my files manually, so is there a quick way to find out and check for them?

    P.S. If there were improperly closed tags or something, then my theme wouldn’t work, right? But its working. Its only when i include my search form that it shows an error.

    Thread Starter firstain

    (@firstain)

    Hi,

    i tried using <?php get_search_form(); ?> and instead of showing my search bar, it just displayed the code of the file.

    Code of my searchform.php file:

    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <div><input type="text" value="<?php if(is_search() ) { the_search_query(); } else { echo 'Search...'; } 
    
    ?>" name="s" id="s" onfocus="if(this.value=='Search...')this.value='<?php the_search_query(); ?>'" 
    
    onblur="if(this.value=='')this.value='Search...'" />
    <input type="submit" id="searchsubmit" value="Search" />
    </div>
    </form>

    I called this in my header file. Instead of search bar, it showed this on my theme:

    ??<?form method="get" id="searchform" action="<??php bloginfo('url'); ?>/"> <?div><?input type="text" value="<??php if(is_search() ) { the_search_query(); } else { echo 'Search...'; } ?>" name="s" id="s" onfocus="if(this.value=='Search...')this.value='<??php the_search_query(); ?>'" onblur="if(this.value=='')this.value='Search...'" /> <?input type="submit" id="searchsubmit" value="Search" /> <?/div> <?/form>

    What’s happening? What are these strange question marks that appear?

    I then removed the searchform.php file from my directory and refreshed the page and voila! The search bar with a search button next to it appeared. But the problem is i don’t like the default search form. I want to style my own form and have other effects. What and how to do?

    I also have a modified search.php file.

    What to do now?

    Thread Starter firstain

    (@firstain)

    “Third: the specific problem you’re having appears to be an issue with your local test environment. Note the specified filepath:”

    What could be the cause of this problem? How did it occur? How to solve it now?

    Thanks for get_search_form()

    Thread Starter firstain

    (@firstain)

    Thanks ??

    Thread Starter firstain

    (@firstain)

    Hey i know this. I’ve tried in my theme and it works fine. But when i uploaded my own custom theme to my official and Live website https://firstain.com/ and then went to ‘themes’ page and previewed my custom theme, it didn’t work. It showed the entire post on the homepage with no ‘continue reading’ link as my https://localhost/wordpress/ shows.

    What could be the problem?

    even i’m having the same problem with the custom theme i’m making. I want to show only 2-3 lines of a post on homepage but instead full article is being shown on homepage ??

    Forum: Fixing WordPress
    In reply to: Wp-cron.php
    Thread Starter firstain

    (@firstain)

    Deactivated all plugins. Issue still there. What now? What is causing this?

    Thread Starter firstain

    (@firstain)

    ?

    Thread Starter firstain

    (@firstain)

    Hey thanks for the reply Redcentaur.

    The problem was not with the theme. It was with a plugin. RELATED POSTS THUMBNAIL. That plugin did a lot of mess and made so many useless files which ran so many unused scripts. So disabled that plugin now and problem is solved.

    But does anyone know what i should be doing with those files? Can i delete it now or will there be any side effect like broken links or whatever?

    The plugin used images of posts to show as thumbnail and rather than using the one i already upload to my wp/content, it started creating its own and that too not an image but a page linking to that image. This led many of my users to get the 404 error because no such page actually existed. The plugin just created link to page but nothing on the page.

    So can i clear the mess this plugin caused? How?

    Thanks everyone one for chipping in with their knowledge to help me out.

    Thread Starter firstain

    (@firstain)

    I upgraded to WP 3.0.1 today. Still getting 500 error.
    Do i still need to download WP again?

    Thread Starter firstain

    (@firstain)

    I asked my host (HostGator) about this and this is what the replied:

    —————————–
    We could just find the following logs at that time (the time the 500 Internal Server Error got encountered) and nothing else:

    [Wed Jul 28 00:29:35 2010] [error] [client 183.87.74.22] Premature end of script headers: admin-ajax
    .php, referer: https://firstain.com/wp-admin/post.php?post=3885&action=edit&message=6
    [Wed Jul 28 00:29:35 2010] [error] [client 183.87.74.22] SystemException in API_Linux.cpp:172: setui
    d() failed: Resource temporarily unavailable, referer: https://firstain.com/wp-admin/post.php?post=38
    85&action=edit&message=6
    [Wed Jul 28 00:29:35 2010] [error] [client 183.87.74.22] Premature end of script headers: index.php,
    referer: https://firstain.com/wp-admin/post.php?post=3885&action=edit&message=6
    ——————————————

    So what does this mean?

Viewing 15 replies - 1 through 15 (of 19 total)