Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-07 15:14:16

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

[resolved] View (draft) returns 404

Odd one…

I have a live and local installation of a site. The local is the exact twin of the live (same files, same .htaccess contents, sime DB recently imported to local…). However, the View feature for draft articles does not work in the live site (giving a 404 page not found error), but does in the local. I have no idea what could be the problem.

Offline

#2 2009-06-07 15:49:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [resolved] View (draft) returns 404

Yep I have a similar problem with my sites except I don’t get a 404. I get the template but not the body or anything associated with the article.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-06-07 16:01:36

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [resolved] View (draft) returns 404

Probably a silly remark but you need to save the article before you can preview it, are you sure you did that?

Offline

#4 2009-06-07 16:23:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [resolved] View (draft) returns 404

Hi Els,

Just to make things clear. Yes the articles ARE saved:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2009-06-07 16:38:29

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [resolved] View (draft) returns 404

Yes, definitely saving. No difference.

Offline

#6 2009-06-07 17:26:37

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: [resolved] View (draft) returns 404

Any chance you are using zem_redirect or any other plugin which tries to intercept URIs?

Offline

#7 2009-06-07 17:47:57

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [resolved] View (draft) returns 404

wet wrote:

Any chance you are using zem_redirect or any other plugin which tries to intercept URIs?

that’s what it is!!!! Short of disabling zem_redirect, is there a way around it?

Last edited by colak (2009-06-07 17:48:50)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#8 2009-06-07 18:15:34

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: [resolved] View (draft) returns 404

I think you can patch zem_redirect by amending that sequence around line #60

 		if (empty($permlink_mode)
 			or $permlink_mode == 'messy'
			or strcasecmp(serverSet('REQUEST_METHOD'), 'POST') == 0)
 			return;

to read

 		if (empty($permlink_mode)
 			or $permlink_mode == 'messy'
			or strcasecmp(serverSet('REQUEST_METHOD'), 'POST') == 0
			or gps('txpreview'))
 			return;

Offline

#9 2009-06-07 18:28:46

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [resolved] View (draft) returns 404

I’m not using zem_redirect. Closest plugin of sorts, I guess, was ajw_clean_feed, but disabling it didn’t make a difference.

Other active plugins are:

  • rah_autogrowing_textarea
  • wet_babble
  • wet_commentmagic
  • zem_article_info
  • zem_contact_lang
  • zem_contact_reborn

Offline

#10 2009-06-08 07:08:00

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [resolved] View (draft) returns 404

wet wrote:

I think you can patch zem_redirect by amending that sequence around line #60

 		if (empty($permlink_mode)
 			or $permlink_mode == 'messy'
			or strcasecmp(serverSet('REQUEST_METHOD'), 'POST') == 0)
 			return;

to read

 		if (empty($permlink_mode)
 			or $permlink_mode == 'messy'
			or strcasecmp(serverSet('REQUEST_METHOD'), 'POST') == 0
			or gps('txpreview'))
 			return;

That did it! Thanks Robert.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2009-06-30 20:06:11

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: [resolved] View (draft) returns 404

Latest discovery on my situation is that I am the only one having the problem. The other publisher on the same site can use the feature no problem. eh?

Offline

#12 2009-07-01 00:09:33

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [resolved] View (draft) returns 404

Destry wrote:

Latest discovery on my situation is that I am the only one having the problem. The other publisher on the same site can use the feature no problem. eh?

Well:

  • You do have refresshed your cache?
  • Your browser, operating system and installed browser extensions?
  • The exact draft preview link is?
  • Does the requested preview URL show correctly in server access logs (no malformed dots, odd encoding)?
  • What headers your browser receives when viewing the preview page?
  • Also what headers it sends?

Last edited by Gocom (2009-07-01 00:14:41)

Offline

Board footer

Powered by FluxBB