• Resolved aizik

    (@aizik)


    Hi

    Upgraded from 2.9 to 3.0 b2. Everything seems to be working fine except that newly uploaded images are not displayed.

    The generated url for a new image is (what appears in the source code for a page):
    http://site.com/files/2010/05/image.jpg

    The image appears broken.

    Opening the following address does works:
    http://site.com/wp-content/files/2010/05/image.jpg

    The images are uploaded to the correct directory the only problem is with the “/wp-content/” added to the url.

    Any ideas? Thanks!

    ps. I have to sites, both showing the same problem. The first one was converted, the second one is new. Also, I started with subdomains and then changed to subdirectories. To change to subdirectory I modified wp-config and htaccess.

Viewing 15 replies - 16 through 30 (of 36 total)
  • Thread Starter aizik

    (@aizik)

    I don’t think so… this is the full htaccess file:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    
    # END WordPress
    
    AuthUserFile 	/dev/null
    AuthGroupFile 	/dev/null
    AuthType 	Basic
    AuthName 	"AllowFrom"
    
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from xx.xx.xx.xx
    </Limit>
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Can’t hurt to try wrapping it in <IfModule mod_rewrite.c> ... </IfModule>

    Second thought, on the Tools -> Network page, what does IT say your .htaccess should be?

    Also double check your wp-config’s set up correctly with the right domain and basepath and all.

    Are you running any sort of redirect plugins?

    And at a last gasp, I suppose putting in this to your htaccess would help:
    RewriteRule ^files/(.*)$ http://domain.com/wp-content/files/$1 [L,R=301]

    (In the back of my head, I have this … idea that something with your installation path is the cause, but I just can’t lock down on that thought.)

    @annointed if you do find something you think the devs shoudl look at then, please please please file a trac ticket so they can look at it?

    Thread Starter aizik

    (@aizik)

    I added the <ifmodule> nothing changed.

    The htaccess is eaxctly the same as in Network page.

    wp-config I’m not sure if everything is ok. It is as follows:

    <?php
    /**
     * The base configurations of the WordPress.
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
     * visiting {@link http://codex.ww.wp.xz.cn/Editing_wp-config.php Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     *
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'mayore99_wp');
    
    /** MySQL database username */
    define('DB_USER', 'XXXXXX');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'XXXXXX');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    /** Activar Hyper Cache plugin */
    
    define('WP_CACHE', true);
    
    /** Activar MultiSite */
    
    //define('WP_ALLOW_MULTISITE', true);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'intranet.mayoreoelectrico.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    
    define( 'AUTH_SALT', '~t+x0O+;<code>e;z37Mj49s</code>@a-T%HPbj}~T9Jz[PqT*pP(la)+HgG_nei~-N<w-88vh' );
    define( 'SECURE_AUTH_SALT', 'b}2<{J([email protected]+i.n<@K]AuIP}bvT+s~8a}@.M) gI4H+A|<{pK!:2A9Q,9I' );
    define( 'LOGGED_IN_SALT', 'pdKWCuGk/d~[njgrx4HK,d!x?mihs7z|
    
    Gyx|Sqih0U:BF8pXPr|{+WKV[WWi8Cs' );
    define( 'NONCE_SALT', 'ofa$N
    
    KkC%,EDSZ>e{wTxV^{e@>0NnVZn#3]q]kzZgI.uW{/w#!dPD-F8yf~(HW<' );
    
    /**#@+
     * Authentication Unique Keys.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.ww.wp.xz.cn/secret-key/1.1/ ww.wp.xz.cn secret-key service}
     *
     * @since 2.6.0
     */
    define('AUTH_KEY', 'XXXXX');
    define('SECURE_AUTH_KEY', 'XXXXXX');
    define('LOGGED_IN_KEY', 'XXXXX');
    define('NONCE_KEY', 'XXXXX');
    /**#@-*/
    
    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each a unique
     * prefix. Only numbers, letters, and underscores please!
     */
    $table_prefix  = 'wp_';
    
    /**
     * WordPress Localized Language, defaults to English.
     *
     * Change this to localize WordPress.  A corresponding MO file for the chosen
     * language must be installed to wp-content/languages. For example, install
     * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
     * language support.
     */
    define ('WPLANG', 'es_ES');
    
    /* That's all, stop editing! Happy blogging. */
    
    /** WordPress absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    ?>

    Not sure if the Abspath would have anything to do with it.

    On one of the sites I do have many plugins active, but on the other 2 sites there are no plugins and the same happens.

    Thanks again…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Where’s the actual location the sever?

    If I had a subdomain setup like you do, mine would be at /home/ipstenu/public_html/intranet (for example). I have no idea if it’s relevant or if I’m grasping at straws! *sigh*

    Thread Starter aizik

    (@aizik)

    The actual location is:

    /home/mayore99/public_html/intranet

    aha! If it is indeed the main site in the install, that’s probably why. But it may still need looking at.

    Thread Starter aizik

    (@aizik)

    andrea, what do you mean?

    Thread Starter aizik

    (@aizik)

    This is stranger than I thought. Now I’m convinced that the redirect is working in Chrome but nothing else. In Chrome I can download uploaded files, see images, etc. and the same url does not work in Safari, Firefox or IE.

    What is going on?!

    Frumph

    (@frumph)

    check your database for the mainsite for the fileupload_url option in the wp_1_options database table.

    there are cases where it doesn’t get created

    Thread Starter aizik

    (@aizik)

    Bingo!

    I don’t see a wp_1_options table. There is a wp_options table that has the information for the main site.

    What should I do now?

    These are the tables I have:
    `help_desk
    help_desk_knowledgebase
    help_desk_ticket
    wp_3_commentmeta
    wp_3_comments
    wp_3_links
    wp_3_options
    wp_3_postmeta
    wp_3_posts
    wp_3_terms
    wp_3_term_relationships
    wp_3_term_taxonomy
    wp_3_ue1_cache
    wp_4_commentmeta
    wp_4_comments
    wp_4_links
    wp_4_options
    wp_4_postmeta
    wp_4_posts
    wp_4_terms
    wp_4_term_relationships
    wp_4_term_taxonomy
    wp_blogs
    wp_blog_versions
    wp_bp_activity
    wp_bp_activity_meta
    wp_bp_friends
    wp_bp_groups
    wp_bp_groups_groupmeta
    wp_bp_groups_members
    wp_bp_messages_messages
    wp_bp_messages_notices
    wp_bp_messages_recipients
    wp_bp_notifications
    wp_bp_xprofile_data
    wp_bp_xprofile_fields
    wp_bp_xprofile_groups
    wp_calendar
    wp_calendar_categories
    wp_calendar_config
    wp_commentmeta
    wp_comments
    wp_connections
    wp_connections_terms
    wp_connections_term_relationships
    wp_connections_term_taxonomy
    wp_eg_attachments_clicks
    wp_eventscalendar_main
    wp_faqtastic_groups
    wp_faqtastic_questions
    wp_faqtastic_related
    wp_links
    wp_options
    wp_pollsa
    wp_pollsip
    wp_pollsq
    wp_postmeta
    wp_posts
    wp_registration_log
    wp_signups
    wp_site
    wp_sitemeta
    wp_statpress
    wp_tdomf_table_edits
    wp_tdomf_table_forms
    wp_tdomf_table_sessions
    wp_tdomf_table_widgets
    wp_terms
    wp_term_relationships
    wp_term_taxonomy
    wp_ue1_cache
    wp_usermeta
    wp_users `

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    How weird. I don’t have the fileupload_url setting in 2 of my four sites on an multisite site, but I have no issues.

    I have upload_url_path of course, but no fileupload_url. In specific, I don’t have it on the two blogs I imported to Multi Site, but I DO have it on the two I created after the 3.0 jiggering.

    FYI, added them in and nothing bad happened. It looks like these aren’t getting created? http://core.trac.ww.wp.xz.cn/ticket/13483 implies that they’re NOT needed, though. Confused!

    Thread Starter aizik

    (@aizik)

    It worked!

    I feel bad to admit that the problem was something simpler. The Hyper Cache plugin was breaking the links. I had purged the Cache and the plugin was only active for 1 of the sites but it still affected all of them.

    Thanks for all the help!

    I have the same problem, my .htaccess is okay and is exactly the same as what’s posted above.

    Upload Path: wp-content/blogs.dir/8/files
    Fileupload URL: http://christianpinoys.com/news/files

    When I upload a sample image on one of my sites on the network, I get this url: http://christianpinoys.com/news/files/Winter.jpg – it doesn’t show up

    I’m a noob and I don’t really understand what’s wrong with it. Help anyone?

    Help will be very much appreciated πŸ™‚

Viewing 15 replies - 16 through 30 (of 36 total)

The topic ‘Multisite image path error’ is closed to new replies.