Opened 17 years ago
Closed 16 years ago
#6529 closed defect (bug) (worksforme)
Cannot edit page-slug before publishing
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 2.7 |
Component: | JavaScript | Keywords: | needs-patch |
Focuses: | Cc: |
Description
Only after publishing a new PAGE will the permalink display and become editable.
First reported as a RC bug in ticket #6416, the issue was quickly dismissed as invalid because it could not be duplicated.
I confirm that this is a problem in 2.5 final. I have seen this on different pc's, using different browsers (IE7, FF, and Safari), in different installs of WP2.5 (including one absolutely clean and new installation), on different hosts (including one WAMP server).
The problem exists only with a new PAGE. The new POST function works as designed.
Skeptics should see the attached screen capture.
Attachments (2)
Change History (22)
#2
@
17 years ago
Cannot reproduce. Screencast of page slug editing pre-publish
#3
@
17 years ago
Related Forum thread http://wordpress.org/support/topic/164429
#5
in reply to:
↑ description
@
17 years ago
Experiencing the same problem here.
I can create a screencast to prove it, since there seems to be an air of "works fine for me so isn't a problem".
What information do the devs need to help to actually pinpoint why this occurs on some systems and not on others?
#6
@
17 years ago
It seems like the same process is applied on post-new.php and it works without a problem there. However, on page-new.php, that's where the issue is.
It appears the AJAX POST request to admin-ajax.php isn't coming back with a response. When the request, with action 'sample-permalink', is sent, nothing is received. Firebug just says "Loading..." when inspecting the current javascript processes.
#7
@
17 years ago
- Milestone changed from 2.6 to 2.5.1
I did make a ticket for this issue, and just found this ticket, I just want to add an information:
I have WordPress 2.5 work on 3 servers, two work well with the Page slug (dedicated servers) and another is a hosting from 1and1 where the Page slug does not work.
#8
@
17 years ago
Reproduced with PHP 4.3.3, but not with 5.2.3. It may be specific to the PHP version.
#9
@
17 years ago
Issue produced with 4.4.8
Non with 5.2.5
Requirement for WP2.5 perhaps should be PHP 5, j/k
#11
@
17 years ago
I'm running WP 2.5 on the Media Temple grid server, PHP 5.2.5.
I came across this ticket because I was having this exact problem with a page I built last week - couldn't get the edit slug link to appear until after I'd published.
BUT Ive just tried to recreate it and suddenly.. its working fine. I have no clue what I did differently, but Ive made no changes to any of the files on my server since before I noticed the problem. I don't think Ive deactivated any plugins in the meantime, but I'll look into that a bit further when I get a chance...
#12
@
17 years ago
I have this problem as well on WP 2.5.1 on PHP 4.4.1.
Although I am not very familiar with the WP internals, I have come up with two possible workarounds. These work for me, but could damage your system so be careful. I believe Approach 1 is safer because it only changes the presentation on the Javascript level, whereas Approach 2 messes with the internals of a PHP function.
Approach 1: Re-enable the slug field for pages. In the file wp-admin/js/page.js, change the line
jQuery('#pageslugdiv').hide();
to
// jQuery('#pageslugdiv').hide();
Approach 2: Try to fix the permalink box for draft pages. In the file wp-admin/includes/post.php, change the following lines
$uri = get_page_uri($post->ID); $uri = untrailingslashit($uri); $uri = strrev( stristr( strrev( $uri ), '/' ) ); $uri = untrailingslashit($uri); if ( !empty($uri) ) $uri .='/'; $permalink = str_replace('%pagename%', "${uri}%pagename%", $permalink);
to
if (in_array($original_status, array('draft', 'pending'))) { $permalink = '%pagename%'; } else { $uri = get_page_uri($post->ID); $uri = untrailingslashit($uri); $uri = strrev( stristr( strrev( $uri ), '/' ) ); $uri = untrailingslashit($uri); if ( !empty($uri) ) $uri .='/'; $permalink = str_replace('%pagename%', "${uri}%pagename%", $permalink); }
#13
@
17 years ago
Having compared the post.js file with the page.js file the jQuery commands are specified in a different order. I cannot reproduce this issue but have attached a patch the alters the command order in page.js to match the order in post.js
This might be worth applying and testing.
#15
@
17 years ago
Also a bug (with 2.6) on PHP 4.3.9 but not seen on 5.2.5.
I applied the patch diff (to the broken one) but it had no effect.
#16
@
16 years ago
- Keywords needs-patch added
- Milestone changed from 2.9 to 2.8
- Version changed from 2.5 to 2.7
Bizarely, this is still an issue in 2.7
#17
follow-up:
↓ 18
@
16 years ago
Just to add that I can see this bug in WordPress 2.7.1, clean install, Default theme.
PHP Version 5.2.6, MySQL 5, Apache 2.0.
Hosting is DreamHost.
#18
in reply to:
↑ 17
;
follow-up:
↓ 19
@
16 years ago
Replying to lelion:
Just to add that I can see this bug in WordPress 2.7.1, clean install, Default theme.
PHP Version 5.2.6, MySQL 5, Apache 2.0.
Hosting is DreamHost.
This has been fixed for 2.7
Click new page, now select "Screen Options" from top right just below Howdy, admin. This is where you can select to slug.
Hope this helps.
Thanks
#19
in reply to:
↑ 18
@
16 years ago
- Component changed from Administration to JavaScript
- Keywords page slug permalink removed
- Owner changed from anonymous to azaozz
Replying to zeronex:
This has been fixed for 2.7
Click new page, now select "Screen Options" from top right just below Howdy, admin. This is where you can select to slug.
no no, it's a genuine issue. it's supposed to display the permalink under the title (as is done with the post)
screen capture of missing page slug/permalink