Feature #425
closedEdit "Not Found" text on new blogs
Added by Matt Gold almost 14 years ago. Updated over 13 years ago.
0%
Description
When members start a blog and then visit the home page of the blog before publishing a post, they see text that says :
Not Found
Sorry, but you are looking for something that isn't here.
[search box]
Instead this text should say something like:
A post has not yet been published on this blog.
Updated by Boone Gorges almost 14 years ago
- Assignee changed from Boone Gorges to Chris Stein
Chris, can you change this in the WP language file?
This will only fix the issue for themes that have made the string translatable, which at a glance appears to be maybe 25% of them. But apart from editing every theme file that has it hardcoded, this is about all we can do.
Updated by Boone Gorges over 13 years ago
- Assignee changed from Chris Stein to Raymond Hoh
Switching this to Ray. Ray, this just needs to be added to our WP language file. (I assume that this string is there, since it appears - I'm guessing? - in twentyten)
Updated by Raymond Hoh over 13 years ago
Boone Gorges wrote:
Switching this to Ray. Ray, this just needs to be added to our WP language file. (I assume that this string is there, since it appears - I'm guessing? - in twentyten)
I don't think we should be changing the language file in TwentyTen because the "Not Found" string is used in two places: 404 template and loop.php when there's no match. So changing this string will also affect the 404 template as well.
With regards to the other error message, when I created a new blog with no posts, I received this message instead:
"Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post."
Can someone confirm this? I was looking at /twentyten/index.php and this is the message that should be shown.
"Sorry, but you are looking for something that isn't here." only applies to the search template when there are no matches.
What I would recommend is to either:- create a child theme of Twentyten so we can customize the loop template file. (Basically, create loop-index.php so we can override what is shown when there are no matches on the frontpage.)
- create a loop-index.php file directly in Twentyten. This file doesn't currently exist in the theme. The theme author thought ahead!
The latter approach might be preferred because I'm guessing a lot of people on CUNY are using TwentyTen as their blog theme and we wouldn't want to disrupt any working blogs. We just need to be cautious when upgrading the TwentyTen theme.
Updated by Raymond Hoh over 13 years ago
Matt Gold wrote:
When members start a blog and then visit the home page of the blog before publishing a post, they see text that says :
Not Found
Sorry, but you are looking for something that isn't here.
[search box]
Instead this text should say something like:
A post has not yet been published on this blog.
Okay, I checked out cdev and found an instance of this:
http://mytesting1.cdev.gc.cuny.edu/
Boone, when you added the CET New Blog Defaults plugin, are new blogs setup to use Kubrick or Twentyten?
On my local master, when I create a new blog, Twentyten is used.
Updated by Raymond Hoh over 13 years ago
Just checking some new blogs on production and they do use Twentyten as the default theme, so I've gone ahead and added loop-index.php to Twentyten:
https://github.com/castiron/cac/commit/6bf16423565d2c8806a6527814f8fd9099883846
Screenshot on my master branch:
http://i53.tinypic.com/dwcapy.png
Boone, if we don't want to add a file to Twentyten, I could probably find an alternate method by hacking the localization global and some conditionals. I'll leave it up to you before I close this ticket.
FYI, the original problem that Matt describes occurs on the Kubrick theme only. We could fix this as well, but we'd have to modify the index.php file in Kubrick. Boone, let me know if we should do this.
Updated by Boone Gorges over 13 years ago
(Sorry I haven't replied - I must just have been added as a watcher.)
This ticket would have been filed before we moved to WP 3.0 and TwentyTen. I don't think we need to fix Kubrick; I don't want to be in the business of maintaining text strings in every one of the themes on our installation. TwentyTen is probably a special case, because it is the default.
Your solution looks good to me, Ray. My only question - this isn't going to be overwritten when I svn switch us to a new version of WP, is it? I know that Git will ignore files not in the original repo, but I can't remember how svn works.
Updated by Raymond Hoh over 13 years ago
Boone Gorges wrote:
(Sorry I haven't replied - I must just have been added as a watcher.)
Yeah, I just added you as a watcher when I had the chance to test it!
My only question - this isn't going to be overwritten when I svn switch us to a new version of WP, is it? I know that Git will ignore files not in the original repo, but I can't remember how svn works.
I'm not well-versed with SVN enough to give a definitive answer.
Here's a StackOverflow question asking something similar:
http://stackoverflow.com/questions/1887284/does-svn-switch-ever-delete-locally-added-files
SVN does have an ignore property, but I'm not sure how that gels with switch.
Updated by Boone Gorges over 13 years ago
- Status changed from Assigned to Resolved
Sounds like svn should be smart about it. I'll make a note to check it next time I upgrade WP. Thanks, Ray!