Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-06-19 08:57:01

Gallex
Member
Registered: 2006-10-08
Posts: 1,315

Re: custom field as an url

wet wrote:

Gallex, can you capture the network traffic with Firebug or something similar when you click “Save” and receive the notorius “Sorry, the form could not be submitted. Please try again later.” message? I am interested in your server’s response. It usually looks something like this: $(document).ready(function() { $(“#messagepane”).html(“<span id=\“message\” class=\“success\”>.

hmm…which firebug tool i need to use for that? web console, debugger, inspector…which? cause i dont’t know, where i should look for.

Offline

#14 2013-06-19 09:25:44

Gallex
Member
Registered: 2006-10-08
Posts: 1,315

Re: custom field as an url

this? found it almost at the end of debugger

<script type="text/javascript">
$('#write-timestamp input.year,#write-timestamp input.month,#write-timestamp input.day,#write-timestamp input.hour,#write-timestamp input.minute,#write-timestamp input.second').change(
			function() {
				$('#publish_now').prop('checked', false);
				$('#reset_time').prop('checked', false);
			});
</script>

Offline

#15 2013-06-19 10:58:14

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

Re: custom field as an url

Both Firefox and Chrome offer debugging tools by default, meaning despite the common belief, you don’t really need Firebug. What you posted is not what Robert is after. The debugger tab, if I remember correctly, shows any application code the browser has evaluated during the recorded instance. That what you posted is just an embedded JavaScript snippet from the HTML page. What you should be interested at is either web console, or network tab depending on what browser you are using.

  1. Open a new browser tab with your Textpattern control panel open with.
  2. Open up your browser’s web developer tools/inspector. In Firefox its located at Tools > Developer > Web Console. In Chrome its under the non-standard Menu > Tools > Developer, once open select the Network tab.
  3. If you are using Firefox make sure “Log request and response bodies” is selected under Net menu. Otherwise it will only log headers (at least for anything that is cached).
  4. Open up an existing article in the Textpattern’s Write editor.
  5. Enter in the URL to the custom field.
  6. Click the Save button to save the article.
  7. In the Web Console or Network tab (if on Chrome) you will see requests being logged in. Click the new POST request that will be logged in it (the one that resource is set as index.php likely). Click it open, and you will be able to see the response body and headers.

Last edited by Gocom (2013-06-19 11:00:50)

Offline

#16 2013-06-20 09:52:33

Gallex
Member
Registered: 2006-10-08
Posts: 1,315

Re: custom field as an url

did it, but it gives me response of an error_default page!??

sidenote: same issue using smd_random_banner plugin – can’t insert urls into ‘alternate text’ field of images.

Last edited by Gallex (2013-06-20 10:05:58)

Offline

#17 2013-06-20 10:38:58

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

Re: custom field as an url

After a bit of play with Gallex’ site this is what I’ve found:

Whenever something resembling an URL is part of the posted data, Textpattern replies with the error_404 page. Ok, that’s a ‘Not found’ error – but why is a page missing?

Most certainly, this is caused by Apache experiencing a root error like ’403 Forbidden’. This error in turn is probably thrown by an overly eager security module your hosting provider has set up to inhibit “malicious” post data like these URLs.

Apache tries to find a proper error document for this root error, and fails to find one. Thus, Apache throws a subsequent 404 error which Textpattern gracefully handles by sending you its “404 Not Found” error page.

Meanwhile the form submission code on the Write tab does not expect to encounter a “404 Not Found” error page, bails out and displays the original “Sorry, the form could not be submitted” message box.

Conclusion:

Your hosting provider applies too strong security measures. There’s nothing Textpattern can do to weaken or disable these security measures.

Quoting Jukka:

Check with your hosting provider. Seems like your standard packet filtering issue.

Offline

#18 2013-06-20 13:42:49

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: custom field as an url

wet dijo:

There’s nothing Textpattern can do to weaken or disable these security measures.

I have the same issue, could any SQL guru please tell me how to code the instruction to remove the “http://” form my custom field “custom_8” via phpmyadmin?

I have no idea of SQL and I’m planning to change my site: now I store complete URL and remove “http://” on the anchor text of links on the front, but since now I will do the opposite: store URLs without “http://” and and it to the anchors href via form, but I don’t know how to clean up to 3000 URLs allready stored in my custom field!

Thanks a lot.


<txp:rocks/>

Offline

#19 2013-06-20 13:49:15

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

Re: custom field as an url

Hi Jorge,

It’s not as automatic and there will be a lot of donkey work but adi_matrix helped me tremendously when I was updating my site.


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

Offline

#20 2013-06-20 13:53:36

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: custom field as an url

I am not a SQL guru, but that shouldn’t be difficult (CAUTION: untested!):

UPDATE `textpattern` SET `custom_1` = REPLACE( `custom_1`, 'http://', '' );

Offline

#21 2013-06-21 11:38:30

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: custom field as an url

etc dijo:

I am not a SQL guru, but that shouldn’t be difficult (CAUTION: untested!):

UPDATE `textpattern` SET `custom_1` = REPLACE( `custom_1`, 'http://', '' );

Now allready tested: it worked like a charm, thank you!


<txp:rocks/>

Offline

Board footer

Powered by FluxBB