• Resolved ZachMatthews

    (@zachmatthews)


    This is apparently a fairly standard problem to have with a new multisite install, but I have read all the past posts and I can’t seem to figure it out.

    The parent install (itinerantangler.com/blog) works just fine.

    The child install (itinerantangler.com/blog/podcasts) is not showing images either in the media library or on the main site page. The media library is complete and copied over all the content from my /uploads/ directory.

    When I did the multisite, as instructed I created a /wp-content/blogs.dir/ directory, which has been populated with a /2/ subdirectory. You can access content directly from that directory: (http://www.itinerantangler.com/blog/wp-content/blogs.dir/2/files/2012/12/1.jpg).

    I’ve asked my host and my httpd.conf file is apparently set to AllowOverride ‘All’. I can’t verify that myself.

    Here’s my .htaccess file. I did the install in sub-directories, not sub-domains:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /blog/
    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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    I would greatly appreciate any help.

    Thanks,
    Zach

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter ZachMatthews

    (@zachmatthews)

    Is it possible I’ve housed this install by naming my WordPress directory itinerantangler.com/blog?

    http://wordpress.org/support/topic/multisite-htaccess-media-files-problem?replies=11

    That seems like a crazy problem to have…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    šŸ³ļøā€šŸŒˆ Advisor and Activist

    Thread Starter ZachMatthews

    (@zachmatthews)

    The third iteration works. Here are the full correct links:

    http://www.itinerantangler.com/blog/podcasts/files/2012/12/1.jpg
    http://www.itinerantangler.com/blog/wp-includes/ms-files.php?file=/2012/12/1.jpg
    http://www.itinerantangler.com/blog/podcasts/wp-content/blogs.dir/2/files/2012/12/1.jpg

    Ok, now what? And thank you so much for your help. You are obviously the guru on this particular issue and I really appreciate you taking the time to help me.

    Zach

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    šŸ³ļøā€šŸŒˆ Advisor and Activist

    This is a 3.4 install I take it? 3.5 doesn’t use blogs.dir anymore.

    I’ve asked my host and my httpd.conf file is apparently set to AllowOverride ‘All’. I can’t verify that myself.

    Ask them what the full AllowOverride setting is šŸ™‚ They may need to make it ‘Options All’

    Thread Starter ZachMatthews

    (@zachmatthews)

    This is a 3.4.2 install, yes. I’m trying to get everything working before I go through the hassle of upgrading. Looks like I just chose a bad time to make the switch; I gather 3.5 was just recently released?

    I have asked my host to set the AllowOverride to Options All.

    Is there any reason you can think of why I would be able to see images posted (in-line) in my posts with certain themes but not with others? I’m being told that the theme I am trying to customize (pinboard) requires featured images for its gallery view. I’ve set featured images independently as well as used a plug in to do so and nothing is happening. The theme is also not recognizing its header graphic nor allowing me to upload to the gallery, which I think is getting back to my .htaccess issue discussed above.

    Thanks again for your help. Hopefully once the httpd.conf setting is ironed out my .htaccess rules will start getting respected and the rest of this will work out on its own.

    Zach

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    šŸ³ļøā€šŸŒˆ Advisor and Activist

    Is there any reason you can think of why I would be able to see images posted (in-line) in my posts with certain themes but not with others?

    Are the themes using TimThumb?

    Thread Starter ZachMatthews

    (@zachmatthews)

    No, they aren’t.

    I’m arguing with my host over getting the httpd.conf file set correctly. Is it ‘AllowOverride Options All’ or ‘AllowOverride Options=All’ that I need to be getting them to set?

    Unsurprisingly they don’t understand what I am trying to do and so I’m getting quite a bit of push back. I’m kinda pissed to be honest. Tech support was asking me to give them my log in credentials so they could ‘re create the issue,’ which obviously they don’t understand to begin with.

    Zach

    Thread Starter ZachMatthews

    (@zachmatthews)

    This is what I am being told. My host is being completely obtuse.

    “I have checked and founds that “AllowOverride” directive is already enabled on server.

    ==================
    [root@eowyn ~]# cat /usr/local/apache/conf/httpd.conf | grep AllowOverride
    AllowOverride All
    AllowOverride None
    AllowOverride None
    [root@eowyn ~]#
    ================== “

    I’ve asked them four times now to set that string to ‘AllowOverride Options=All” instead of just “AllowOverride All.”

    Now I am wondering if the two subsequent lines setting AllowOverride to ‘None’ are actually canceling out the ‘AllowOverride All’ setting. Possible?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    šŸ³ļøā€šŸŒˆ Advisor and Activist

    ‘AllowOverride Options All’

    (That THEY don’t know that scares me a little…)

    Thread Starter ZachMatthews

    (@zachmatthews)

    Ok, so after a little holiday break, this is the response I finally got from the upper-level IT support at my host:

    “Hello,

    Sorry for the late reply , I have checked this thoroughly and I see there is something wrong in the setup of the multisite on wordpress as its trying to pull files for example from
    /home/jitinera/public_html/blog/wp-content/blogs.dir/1/files//2012/12/becks.jpg
    instead of
    /home/jitinera/public_html/blog/wp-content/blogs.dir/2/files//2012/12/becks.jpg

    That seems related to blogid variable .

    I have to add the allowoverride options all has been added and its not affecting the outcome .
    Contact us if you need any further assistance.”

    I had noticed that it was a little weird that all my multisite files had been assigned to a /2/ directory rather than a /1/ directory. I’m going to check the blog id setting now but I thought I’d post again and see if you had any ideas. Thanks again, Ipstenu, for your help.

    Zach

    Thread Starter ZachMatthews

    (@zachmatthews)

    This sounds like a wp_config.php issue somehow, so just for reference, here is my complete config file (minus the passwords):

    <?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.wordpress.org/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', 'USER_wordpress');
    
    /** MySQL database username */
    define('DB_USER', 'USER_USER');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'PASSWORD');
    
    /** 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', '');
    
    /**#@+
     * Authentication Unique Keys and Salts.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    define('AUTH_KEY',         'put your unique phrase here');
    define('SECURE_AUTH_KEY',  'put your unique phrase here');
    define('LOGGED_IN_KEY',    'put your unique phrase here');
    define('NONCE_KEY',        'put your unique phrase here');
    define('AUTH_SALT',        'put your unique phrase here');
    define('SECURE_AUTH_SALT', 'put your unique phrase here');
    define('LOGGED_IN_SALT',   'put your unique phrase here');
    define('NONCE_SALT',       'put your unique phrase here');
    
    /**#@-*/
    
    /**
     * 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_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
     * language support.
     */
    define('WPLANG', '');
    
    /**
     * For developers: WordPress debugging mode.
     *
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     */
    define('WP_DEBUG', false);
    
    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
    
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/blog/';
    define('DOMAIN_CURRENT_SITE', 'www.itinerantangler.com');
    define('PATH_CURRENT_SITE', '/blog/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    
    /* That's all, stop editing! Happy blogging. */
    
    /** 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');
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    šŸ³ļøā€šŸŒˆ Advisor and Activist

    Your host is … Well.

    http://www.itinerantangler.com/blog/podcasts/files/2012/12/1.jpg is now working thought.

    Thread Starter ZachMatthews

    (@zachmatthews)

    I feel like I am getting somewhere, but I still have issues with the media library and I still cannot seem to set a featured image, which is key fot the theme I am using.

    I can now upload an image to the media library, and that image is searchable by its (redirected) link. For example:

    http://www.itinerantangler.com/blog/wp-content/uploads/2012/12/jaystreamsmall.jpg

    That picture showed up in the media library after I created a test post simply linking to it.

    However, my media library still has no thumbnails. I downloaded a plugin called ‘Regenerate Thumbnails,’ and this is the error message it throws:

    ‘Debugging Information

    Total Images: 1
    Images Resized: 0
    Resize Failures: 1

    “jaystreamsmall” (ID 1034) failed to resize. The error message was: The originally uploaded image file cannot be found at’

    Note that it doesn’t actually produce the file location, which tells me something is still not being redirected within the media library.

    Overall setting up a multisite has been ridiculously difficult. I am really surprised as I thought WordPress was billing itself as a content management system at this point, and of course having different themes in different areas of a blog is a pretty straightforward request…

    Any help would be greatly appreciated. I think if I can sort out the media library thumbnail linking issues I will be able to set feature images and my theme will probably work as promised.

    Thread Starter ZachMatthews

    (@zachmatthews)

    One other thing: if I ‘view’ the individual attachment from the Media Library link, as opposed to just going to the actual file location, this is the result:

    http://www.itinerantangler.com/blog/podcasts/2013/01/04/test-post/attachment/1034/

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    šŸ³ļøā€šŸŒˆ Advisor and Activist

    Overall setting up a multisite has been ridiculously difficult. I am really surprised as I thought WordPress was billing itself as a content management system at this point, and of course having different themes in different areas of a blog is a pretty straightforward request…

    No one said Multisite was easy. In fact, I tell everyone “it’s harder than normal WordPress” and I will suggest you not use it if you’re new to WP. It IS harder. It’s very young, and if this is your first brush with WP, you just tried to do a two and an half twist pike dive off the 15 meter platform on your first swimming lesson.

    The main issue I see with folks and Multisite is they try to do everything all at once, instead of taking the time to follow directions and test that things are working before they move on. They tend to assume that since they know how to do WordPress, they know Multisite. Wish it was true, but it’s not. You’re learning to drive a stick shift šŸ˜‰

    Let’s go over some (very confusing) standards for pre WP 3.5 installs šŸ™‚ I’m hoping that understanding how it works together will help you with debugging and understanding where everything is.

    Your MAIN site (domain.com/blog/) will have it’s images at
    URL: domain.com/blog/wp-content/uploads/2012/….
    Filepath: /home/user/domain.com/blog/wp-content/uploads/2012/….

    Your children site (domain.com/blog/child) will be like this:
    URL: domain.com/blog/child/files/2012/….
    Filepath: /home/user/domain.com/blog/wp-content/blogs.dir/2/2012/….

    The child sites are the only ones that use /files/ – they are the only ones that use an annoying ms-files.php redirect. This means they behave differently than your primary site.

    So with that in mind, this URL is not being redirected in any way: http://www.itinerantangler.com/blog/wp-content/uploads/2012/12/jaystreamsmall.jpg Thus we know that any issues you have with the main site (http://www.itinerantangler.com/blog/) is actually unrelated to Multisite!

    Now. podcasts is a child site (http://www.itinerantangler.com/blog/podcasts/) so all of its images should use files

    http://www.itinerantangler.com/blog/podcasts/2013/01/04/test-post/attachment/1034/ (when I view source) has something VERY interesting:

    <figure class="entry-attachment">
    <a href="http://www.itinerantangler.com/blog/podcasts/files/2013/01/jaystreamsmall.jpg" title="jaystreamsmall" rel="attachment">
    </a>
    															</figure><!-- .entry-attachment -->

    Notice the URL has no image inside it? But also that http://www.itinerantangler.com/blog/podcasts/files/2013/01/jaystreamsmall.jpg is a working link? The issue is the theme. It’s not outputting the image.

    So all this goes back to the following: Multisite, in and of itself, seems to be handling your images just fine. Your theme is not. Let’s do the most logical test in the world. Switch your theme back to TwentyEleven on the podcast site. See if that works.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘No images in multisite’ is closed to new replies.