WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] missing files in the 2.7 distribution? (19 posts)

  1. paul
    Member
    Posted 5 years ago #

    Having some issues with permalinks in 2.7 and other oddities, like the theme browser not showing the active theme as active. I discovered that some of the files called w/in the WP admin tools are missing, like templates.php, for editing .htaccess.

    I made a diff from the active directory after adding templates.php from another wp-admin directory I had.

    It's strange that something like this -- either the call to a file that may be deprecated or the fact files are missing -- didn't get caught in the release process. Does no one ever install WP from scratch?

    Here's the diff:

    diff <(ls -R /usr/local/www/data-dist/wordpress/wp-admin) <(ls -R ~/wordpress/wp-admin)

    2d1
    < admin-db.php
    9,12d7
    < bookmarklet.php
    < cat-js.php
    < cat.js
    < categories.js
    16d10
    < custom-fields.js
    18,19d11
    < dbx-admin-key-js.php
    < dbx-admin-key.js
    22d13
    < edit-comments.js
    26d16
    < edit-form.php
    45,46d34
    < install-rtl.css
    < install.css
    51d38
    < link-import.php
    79d65
    < profile-update.php
    85d70
    < templates.php
    93d77
    < upgrade-schema.php
    95,99d78
    < upload-functions.php
    < upload-js.php
    < upload-rtl.css
    < upload.css
    < upload.js
    103d81
    < users.js
    105,106d82
    < widgets-rtl.css
    < widgets.css
    109d84
    < xfn.js
    111c86
    < /usr/local/www/data-dist/wordpress/wp-admin/css:
    ---
    > /root/wordpress/wp-admin/css:
    136,137d110
    < upload-rtl.css
    < upload.css
    141c114
    < /usr/local/www/data-dist/wordpress/wp-admin/images:
    ---
    > /root/wordpress/wp-admin/images:
    148,156d120
    < box-bg-left.gif
    < box-bg-right.gif
    < box-bg.gif
    < box-butt-left.gif
    < box-butt-right.gif
    < box-butt.gif
    < box-head-left.gif
    < box-head-right.gif
    < box-head.gif
    172d135
    < heading-bg.gif
    179,180d141
    < login-bkg-bottom.gif
    < login-bkg-tile.gif
    198d158
    < notice.gif
    208d167
    < toggle.gif
    217,218c176
    < /usr/local/www/data-dist/wordpress/wp-admin/import:
    < b2.php
    ---
    > /root/wordpress/wp-admin/import:
    235c193
    < /usr/local/www/data-dist/wordpress/wp-admin/includes:
    ---
    > /root/wordpress/wp-admin/includes:
    265d222
    < upload.php
    269c226
    < /usr/local/www/data-dist/wordpress/wp-admin/js:
    ---
    > /root/wordpress/wp-admin/js:
    276d232
    < dbx-admin-key.js
    283d238
    < link-cat.js
    295d249
    < upload.js

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Those files are not "missing". They have been removed or renamed. There's no reference in 2.7 to any "templates.php" except in the update-core.php file, where it is in a list of "old files".

    Are you sure you updated everything correctly? Because there's no link to that templates.php file anywhere, and most of the differences you list show the files that have been removed/renamed.

    2.7 is complete and works just fine with a fresh install. I suspect that you did not remove older files from older versions when you upgraded. Or failed to upgrade some older files, resulting in the references to the now deprecated filenames.

  3. paul
    Member
    Posted 5 years ago #

    I wish you and the rest of the moderators were as quick to figure out why permalinks are broken in 2.7 for quite a few of us: lots of posts and unresolved threads on that. I just set up a fresh install of 2.7 on a test server and out of the box, permalinks are not working.

    After using W since 1.5, this is the first, perhaps only, upgrade that has been problematic and bland assurance like 2.7 is complete and works just fine with a fresh install make me wonder if someone making them is actually using it.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Well, okay then. If you want to be that way.

    I just did the same thing and installed 2.7 fresh on a local installation of XAMPP. Permalinks worked fine, first try. Both default and "pretty" permalinks worked.

    So you're going to have to actually investigate your problem a bit deeper to figure out the underlying issue. Is your .htaccess correct? Are you using Apache? Need more info.

    Also, yes, I do use WP on a number of sites, all of which are using 2.7 and permalinks.

  5. paul
    Member
    Posted 5 years ago #

    wordpress/wp-admin/templates.php?file=.htaccess

    This file does exist and is called by the Apache Rewrite rules plugin.

    I assume .htaccess is correct, since WP is writing it. I am using Apache 2.2: is anyone else? I'd love to investigate the problem a bit deeper but as with the other people who are seeing this problem, I don't know what needs to be looked at.

    Help yourself . . .

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>
    robots\.txt$ == index.php?robots=1
    .*wp-atom.php$ == index.php?feed=atom
    .*wp-rdf.php$ == index.php?feed=rdf
    .*wp-rss.php$ == index.php?feed=rss
    .*wp-rss2.php$ == index.php?feed=rss2
    .*wp-feed.php$ == index.php?feed=feed
    .*wp-commentsrss2.php$ == index.php?feed=rss2&withcomments=1
    feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?&feed=$1
    (feed|rdf|rss|rss2|atom)/?$ == index.php?&feed=$1
    page/?([0-9]{1,})/?$ == index.php?&paged=$1
    comments/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?&feed=$1&withcomments=1
    comments/(feed|rdf|rss|rss2|atom)/?$ == index.php?&feed=$1&withcomments=1
    comments/page/?([0-9]{1,})/?$ == index.php?&paged=$1
    search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?s=$1&feed=$2
    search/(.+)/(feed|rdf|rss|rss2|atom)/?$ == index.php?s=$1&feed=$2
    search/(.+)/page/?([0-9]{1,})/?$ == index.php?s=$1&paged=$2
    search/(.+)/?$ == index.php?s=$1
    categories/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?category_name=$1&feed=$2
    categories/(.+?)/(feed|rdf|rss|rss2|atom)/?$ == index.php?category_name=$1&feed=$2
    categories/(.+?)/page/?([0-9]{1,})/?$ == index.php?category_name=$1&paged=$2
    categories/(.+?)/?$ == index.php?category_name=$1
    tags/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?tag=$1&feed=$2
    tags/(.+?)/(feed|rdf|rss|rss2|atom)/?$ == index.php?tag=$1&feed=$2
    tags/(.+?)/page/?([0-9]{1,})/?$ == index.php?tag=$1&paged=$2
    tags/(.+?)/?$ == index.php?tag=$1
    author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?author_name=$1&feed=$2
    author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ == index.php?author_name=$1&feed=$2
    author/([^/]+)/page/?([0-9]{1,})/?$ == index.php?author_name=$1&paged=$2
    author/([^/]+)/?$ == index.php?author_name=$1
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?year=$1&monthnum=$2&day=$3&feed=$4
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ == index.php?year=$1&monthnum=$2&day=$3&feed=$4
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ == index.php?year=$1&monthnum=$2&day=$3&paged=$4
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ == index.php?year=$1&monthnum=$2&day=$3
    ([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?year=$1&monthnum=$2&feed=$3
    ([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ == index.php?year=$1&monthnum=$2&feed=$3
    ([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ == index.php?year=$1&monthnum=$2&paged=$3
    ([0-9]{4})/([0-9]{1,2})/?$ == index.php?year=$1&monthnum=$2
    ([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?year=$1&feed=$2
    ([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ == index.php?year=$1&feed=$2
    ([0-9]{4})/page/?([0-9]{1,})/?$ == index.php?year=$1&paged=$2
    ([0-9]{4})/?$ == index.php?year=$1
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$ == index.php?attachment=$1
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$ == index.php?attachment=$1&tb=1
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?attachment=$1&feed=$2
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ == index.php?attachment=$1&feed=$2
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$ == index.php?attachment=$1&cpage=$2
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$ == index.php?year=$1&monthnum=$2&day=$3&name=$4&tb=1
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ == index.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$ == index.php?year=$1&monthnum=$2&day=$3&name=$4&paged=$5
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comment-page-([0-9]{1,})/?$ == index.php?year=$1&monthnum=$2&day=$3&name=$4&cpage=$5
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$ == index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$ == index.php?attachment=$1
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$ == index.php?attachment=$1&tb=1
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?attachment=$1&feed=$2
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ == index.php?attachment=$1&feed=$2
    [0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$ == index.php?attachment=$1&cpage=$2
    ([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$ == index.php?year=$1&monthnum=$2&day=$3&cpage=$4
    ([0-9]{4})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$ == index.php?year=$1&monthnum=$2&cpage=$3
    ([0-9]{4})/comment-page-([0-9]{1,})/?$ == index.php?year=$1&cpage=$2
    .+?/attachment/([^/]+)/?$ == index.php?attachment=$1
    .+?/attachment/([^/]+)/trackback/?$ == index.php?attachment=$1&tb=1
    .+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?attachment=$1&feed=$2
    .+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ == index.php?attachment=$1&feed=$2
    .+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$ == index.php?attachment=$1&cpage=$2
    (.+?)/trackback/?$ == index.php?pagename=$1&tb=1
    (.+?)/feed/(feed|rdf|rss|rss2|atom)/?$ == index.php?pagename=$1&feed=$2
    (.+?)/(feed|rdf|rss|rss2|atom)/?$ == index.php?pagename=$1&feed=$2
    (.+?)/page/?([0-9]{1,})/?$ == index.php?pagename=$1&paged=$2
    (.+?)/comment-page-([0-9]{1,})/?$ == index.php?pagename=$1&cpage=$2
    (.+?)(/[0-9]+)?/?$ == index.php?pagename=$1&page=$2
  6. whooami
    Member
    Posted 5 years ago #

    wordpress/wp-admin/templates.php?file=.htaccess

    This file does exist and is called by the Apache Rewrite rules plugin.

    wp-admin/templates.php is not a wordpress 2.7 file.

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    This file does exist and is called by the Apache Rewrite rules plugin.

    The file does NOT exist in WordPress 2.7, and the plugin is clearly not 2.7 compatible if it is calling that file.

    Deactivate the plugin.

  8. paul
    Member
    Posted 5 years ago #

    So why is it a recommended debugging tool in the Codex?

    deactivated (like I never tried deactivating all plugins at some point in this ordeal?!)

  9. whooami
    Member
    Posted 5 years ago #

    So why is it a recommended debugging tool in the Codex?

    More than likely because the content on the codex is outdated? The codex is user-generated; its not documentation that is necessarily provided by developers.

    Even you, yes you, can add to the codex.

  10. paul
    Member
    Posted 5 years ago #

    And just to verify, once more, I created a new installation with a fresh install of 2.7, a clean database (thereby finding another issue that needs to be addressed), and while little things like theme selection now work properly, permalinks are still busted.

    As a man once said, it's not what we know that gets us in trouble, it's what we know that ain't so.

    And the other issue? In OS X 10.5/Leopard, you must use Localhost with a capital L, not localhost, in wp-config.php. I assume it's a Leopard issue, not in WP, but it needs fixing/addressing all the same.

  11. whooami
    Member
    Posted 5 years ago #

    And the other issue? In OS X 10.5/Leopard, you must use Localhost with a capital L, not localhost, in wp-config.php. I assume it's a Leopard issue, not in WP, but it needs fixing/addressing all the same.

    bullshit. thats not a wordpress issue. the wp-config.php is the user's to edit.

    Not surprisingly, other folks have figured this out without much intervention from the developers, and they were able to do it without fluffing a bunch of feathers about how experienced they are with WP:

    http://wordpress.org/support/topic/160658?replies=18

  12. ClaytonJames
    Member
    Posted 5 years ago #

    "I would be real interested in knowing whats inside your /etc/hosts file. "

    I second that please. Here, might be a kindred spirit, Paul.

    (8 months old).

  13. ClaytonJames
    Member
    Posted 5 years ago #

    Damn, whooami... you're fast. :-)

  14. whooami
    Member
    Posted 5 years ago #

    yah i edited that out when i found the other thread (its called searching, Paul)-- that said, I wouldnt be surprised to see that Leopard maybe does that. Not being a macfangirl, i wouldnt know.

  15. paul
    Member
    Posted 5 years ago #

    yeah, I found some of those answers myself. I didn't see a solution forthcoming in the latest.zip file (maybe a comment, if that doesn't ruffle anyone's feathers too much?).

    You think /etc/hosts is going to reveal some dark hairy truth?

    ##
    # Host Database
    #
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    ##
    127.0.0.1	localhost
    255.255.255.255	broadcasthost
    ::1             localhost
    fe80::1%lo0	localhost

    Enjoy.

  16. ClaytonJames
    Member
    Posted 5 years ago #

    You think /etc/hosts is going to reveal some dark hairy truth?

    Umm... no, Paul. Not usually many goblins in there. But since you asked...

    I think the broader implication is simply one of suspecting an erroneous entry (for whatever reason), in the hosts file relative to the upper/lower case confusion and spelling of "localhost". Looking in the hosts file for that particular error would simply be a first logical diagnostic step in determining why typing "Localhost" (with an upper case "L") in your address bar, should resolve to your "webserver", and "localhost", (with a lower case "l"), would not. It's a process commonly referred to as "strategy based diagnosis". But now we see that the error is most likely due to this;

    mysql.default_socket = /tmp/mysql.sock in /etc/php.ini.

    A php/OSX configuration issue it would seem. Not anything to do with WordPress.

    Glad you found an answer that worked for you, and I'm glad that I learned something about trying to use OSX (at least Leopard) as a server. Thank you for sharing!!

    Best wishes.

  17. paul
    Member
    Posted 5 years ago #

    No idea when you're going on about.

    ; Default socket name for local MySQL connects.  If empty, uses the built-in
    ; MySQL defaults.
    mysql.default_socket =

    What does that have to do with locating a database host? And how big a deal would it be to make a comment that a capital L in localhost would be useful if uname -s returns Darwin?

    And I was only using OS X to try and isolate the permalinks issue. If someone, besides one helpful user, actually understood how to fix them, this issue would never have come up.

    It turns out -- and not one of the moderators has mentioned this -- that the rewrite_rules in the database were wrong but could be easily fixed, simply by removing them. So I removed them and they were regenerated properly and all seems to be well. Now what's up with that? Did no one know that the rules can be easily regenerated? Did it not occur to anyone that they were perhaps not being updated and since regenerating them is a zero-cost exercise, it might be worth a try?

    I grow more convinced that very few people understand how WP works and I have do far failed to find any of them.

    Apologies if you find my message a little harsh, but I suspect you have no idea how frustrating it is to get the same smug and useless answers over and over again. This has been going on for months. Ponder that before you race to the keyboard to find a post to hit someone over the head with.

  18. whooami
    Member
    Posted 5 years ago #

    It turns out -- and not one of the moderators has mentioned this

    this isnt the first time you mention the moderators. Do you know what their role is? I dont think you do. Otto isnt the supreme answer man for wordpress. His moderator powers dont make him infallible.

    What does that have to do with locating a database host? And how big a deal would it be to make a comment that a capital L in localhost would be useful if uname -s returns Darwin?

    Because when the developers start adding comments regarding ONE thing, than they have to start adding comments about something else. Hosting environments are different. Are they to add comments about about how Godaddy does something? Bluehost? My server? Where do they stop?

    Furthermore, its NOT up to the developers to tell you, hint to you, guide you.. etc.. on how to make MySQL connections. Its YOUR responsibility as the end user to have that knowledge available to you, and to know how to use it.

    How about you go login to the codex, and create some content, explaining it? Thats the purpose of the codex.

    I grow more convinced that very few people understand how WP works ..

    Kettle meet pot. How many times, exactly, were you told that template.php wasnt a 2.7 file? Give us a break.

    Apologies if you find my message a little harsh, but I suspect you have no idea how frustrating it is to get the same smug and useless answers over and over again.

    This particular thread speaks for itself. You started off on the wrong foot-- going off on a tangent regarding one file. As for your other threads, I dont know.

  19. ClaytonJames
    Member
    Posted 5 years ago #

    No idea when you're going on about.

    Obviously.

    It was in the thread whooami and I both gave to you for reference.

    http://wordpress.org/support/topic/160658?replies=18#post-811898

    "This isn't a WordPress issue, but a Mac issue. The correct solution is to set mysql.default_socket = /tmp/mysql.sock in /etc/php.ini."

    And will you look at that... it appears to have been posted by a moderator, too. And if you follow the link posted by lloydbudd (the moderator) , you get even more detailed information. Interesting stuff. It even attempts to explain why "Localhost", (upper case "L"), appears on the surface to be a workaround.

    "Jonokane’s novel solution likely works because instead of using a socket for the local connection, it attempts a TCP/IP connection, and ‘Localhost’ resolves to ‘localhost’. That will only solve the problem for WordPress though, and you would have the same problem with other PHP applications..."

    Here is that link as well... I find the url of the article satisfyingly ironic for some unknown reason. Just my dry sense of humor I guess.

    http://foolswisdom.com/mac-wordpress-error-establishing-a-database-connection/

    And no worries, paul. No offense taken here. We know where you're coming from.

    Peace!

    :-)

Topic Closed

This topic has been closed to new replies.

About this Topic