WordPress.org

Ready to get started?Download WordPress

Forums

Error on Theme Upload (11 posts)

  1. gingee734
    Member
    Posted 3 years ago #

    I get this error when I try to upload my theme:

    Warning: fopen(/nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-content/themes/tfg/style.css) [function.fopen]: failed to open stream: No such file or directory in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on line 4284

    Warning: fread(): supplied argument is not a valid stream resource in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on line 4287

    Warning: fclose(): supplied argument is not a valid stream resource in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on line 4290

    I searched the forums and used nearly every solution that seemed suitable. Then I redid the coding of the theme making sure everything was up to date and correct according to WordPress codex. I don't know what could be wrong since the functions.php file wasn't touched. Although it says the theme was installed successfully, nothing shows up. It's currently not allowing me to upload the theme when I rename the .zip file either.

  2. Abinav Thakuri
    Member
    Posted 3 years ago #

    Maybe something on your theme has a conflict with wordpress...or you can try going to those lines showed in the error.Sometimes there may be big spaces in there that's caused when uploading the wordpress files through ftp or cpanel.

  3. gingee734
    Member
    Posted 3 years ago #

    I'm sorry, I don't know what you're referring to exactly. I don't know what you mean by big spaces. Do you mean time between uploading a theme, where you have to wait? Here's the lines of code from the functions.php file:

    4284
    $fp = fopen( $file, 'r' );

    4287
    $file_data = fread( $fp, 8192 );

    4290
    fclose( $fp );

    The comment markup talks about opening the file but yea... still no clue to what's wrong. My code is fairy basic since I went by codex too.

  4. nikart8272
    Member
    Posted 3 years ago #

    hello gingee734,

    your error shows that style.css is creating some problems.

    best to to fully delete that theme via filezilla and than upload vai same.

    for more help how to.... visit [Link removed - don't self-advertise. - Mod.]

  5. gingee734
    Member
    Posted 3 years ago #

    When I delete and upload it with Filezilla, the theme still won't show up. Any idea on what could be wrong with the style sheet?

    It pretty much goes along these lines...

    /*
    Theme Name: ****
    Theme URI: ****
    Description: ****
    Author: ****
    Author URI: ****
    Version: 1.0
    */
    
    body {
    	background-color: #d4cdda;
    	margin:0;
    }
    
    #header {
    	height:125px;
    	background: #2f2f2f url(../images/top-nav.jpg) repeat-y left scroll;
    	position:absolute;
            top:0;
    	left:0;
            width:100%;
            z-index:100;
    }
    
    #logo {
    	float:left;
    	padding-left:60px;
    	padding-top:20px;
    	padding-bottom:20px;
    	padding-right:25px;
    }
    
    #navmenu {
    	margin-top:50px;}
    
    #navmenu ul {
    	list-style-type: none;
    	list-style-image: none;
    }

    Excluded info marked with "****" - there's more to it of course.

  6. Abinav Thakuri
    Member
    Posted 3 years ago #

    add this line to your wp-config.php
    php_flag display_errors on

    load your site again with the theme activated.you should see some errors now and the lines stated.Open up the file shown with the error and there might be large spaces near to the line stated there.Delete those spaces.

    Or there might be real errors on your codes.dont just look at the lines stated..look on lines near it.

  7. Abinav Thakuri
    Member
    Posted 3 years ago #

    I dont see anything wrong with the css.Yet if you're unnsure you can validate your css through this site:
    http://jigsaw.w3.org/css-validator/

  8. gingee734
    Member
    Posted 3 years ago #

    the code: php_flag display_errors on shows up as a syntax error. I tried it anyway and everything just shows how that line of code is an error. Nothing shows up but that error.

    I set define('WP_DEBUG', true); from false to true. And I get a few errors in functions.php without loading the theme..

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on line 3389
    
    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on line 3387
    
    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /nfs/c06/h04/mnt/94578/domains/joannycastro.com/html/wp-includes/functions.php on line 3387

    Now, the theme is in the theme directory but it's not showing up. I guess I should try to fix the errors above first?

    My CSS came up with no errors from the validator.

  9. Abinav Thakuri
    Member
    Posted 3 years ago #

    No they are just notices not errors.just dont worry about them.Its strange the code is actually correct.Where did you put it in?It should be placed inside your wp-config.php file ..Please check if you did anything wrong..The code is very much correct the way i showed you above.

  10. gingee734
    Member
    Posted 3 years ago #

    I put the code at the end of wp-config.php, exactly as written.

  11. rtrevino9
    Member
    Posted 3 years ago #

    gingee734 did you have any luck fixing this issue I'm having the same problem with "picturethis" theme from themeforest.net

Topic Closed

This topic has been closed to new replies.

About this Topic