# Unable to post topic with code block

**URL:** https://meta.discourse.org/t/unable-to-post-topic-with-code-block/385018
**Category:** Support
**Created:** [March 10, 2025, 3:22pm UTC](https://meta.discourse.org/t/unable-to-post-topic-with-code-block/385018 "2025-03-10T15:22:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![klevent](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@klevent](https://meta.discourse.org/u/klevent)
#### Post date: [March 10, 2025, 3:22pm UTC](https://meta.discourse.org/t/unable-to-post-topic-with-code-block/385018/1 "2025-03-10T15:22:36Z")

</div>

Dear,

I can’t post the following in our discourse instance, would you help me why it could be?

More information: I tried as admin, or as basic user.  
I’m trying to post to a sub category.  
When I try to post without the code it works, then I can edit the post and add the code.  
However if I try to post at once, it gives the error “Oops! This page doesn’t exist or is private”

* * *

Hello  
when I use the OpenSearchAPI I get a response with multiple products.  
The services section for a product looks like this:

```plaintext
 "services": {
   "download": {
     "url": "https://catalogue.dataspace.copernicus.eu/download/6181e91f-df75-518d-89bf-b57c3ad1b4ea",
     "mimeType": "application/octet-stream",
     "size": 61062129
   }
 },

```

Unfortunately, the URL doesn’t work. When trying to download a product I get a 301 HTTP (permanently moved) error. The response does not provide the URL of the new location.  
To download the product, I now use the OData URL:  
[https://download.dataspace.copernicus.eu/odata/v1/Products({ID})/$value](https://download.dataspace.copernicus.eu/odata/v1/Products(%7BID%7D)/$value)

But actually, the provided URL should work, right?

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [March 17, 2025, 5:22pm UTC](https://meta.discourse.org/t/unable-to-post-topic-with-code-block/385018/2 "2025-03-17T17:22:50Z")

</div>

> [@klevent](#):
>
> When I try to post without the code it works, then I can edit the post and add the code.  
> However if I try to post at once, it gives the error “Oops! This page doesn’t exist or is private”

I’ve had this occasionally happen to me. I think it might have been a plugin/extension on my browser or an update was needed to my Discourse instance.

---

<div class="post-metadata">

### Author: ![klevent](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@klevent](https://meta.discourse.org/u/klevent)
#### Post date: [July 3, 2025, 3:12pm UTC](https://meta.discourse.org/t/unable-to-post-topic-with-code-block/385018/3 "2025-07-03T15:12:53Z")

</div>

Dear,

We upgraded Discourse to the latest (3.4.6). For the first 3 tries the post still didn’t go through and didn’t state “Oops! This page doesn’t exist or is private”: it just seemed as a frozen post. After waiting for over 60 seconds I refreshed the page and then I saw the post back in draft.  
On the 4th try the posting was successful within 2 seconds.

I proceeded with tests and now I’m having this “freezing” issue with another code block:

* * *

Test

```plaintext
# Import required packages
import openeo
from openeo.processes import process

# Connect to the back-end
connection = openeo.connect("https://openeo.dataspace.copernicus.eu")
# ToDo: Here you need to authenticate with authenticate_basic() or authenticate_oidc()

loadco1 = connection.load_collection(collection_id = "SENTINEL1_GRD", spatial_extent = {"east": -6.13279592954927, "north": 43.46046556339803, "south": 43.40424444976031, "west": -6.202756085062023}, temporal_extent = ["2023-09-01", "2023-09-13"])
savere1 = loadco1.save_result(format = "NETCDF")

# The process can be executed synchronously (see below), as batch job or as web service now
result = connection.execute(savere1)

```

Further information/tests I’ve done:

-I’m testing in the staging environment  
-I tested with Firefox that has no plugins / extensions.  
-I tested in `/safe-mode`, the issue persists.  
-I tested by mentioning the language as ```python… the issue persists.  
-cutting to the next line such as result = connection.execu  
te(savere1)  
the issue persists  
-no error in Firefox’s console.  
-I tried posting after turning off the preview, the issue persists

My settings:  
Default code lang: python  
Autohighlight all code: Unchecked  
Highlighted languages: (empty)  
Code formatting style: code-fences

The issue disappears if  
1-I escape the `()` such as `execute\(savere1\)`  
2-I delete .execute(savere1)  
3-post the code partly, then edit and add the rest of the code

But I don’t wish to suggest users solutions as 1,2,3 as they are sub-optimal / I can’t predict for which keywords (e.g. .execute) it would brake etc.

if there are any other suggestions please share

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [October 8, 2025, 1:14pm UTC](https://meta.discourse.org/t/unable-to-post-topic-with-code-block/385018/4 "2025-10-08T13:14:26Z")

</div>

Hello @klevent I moved your post to a new #Support topic. Were you able to resolve your issue? It certainly looks like a weird one!

If the code block you were unable to post on your site can be posted here on meta, then likely your site has a component or plugin that is interfering. Can you try [safe mode](https://meta.discourse.org/t/53504?silent=true)?

---

<div class="post-metadata">

### Author: ![klevent](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@klevent](https://meta.discourse.org/u/klevent)
#### Post date: [December 16, 2025, 9:22am UTC](https://meta.discourse.org/t/unable-to-post-topic-with-code-block/385018/5 "2025-12-16T09:22:30Z")

</div>

> [@klevent](#):
>
> 2 seconds.

Hello @tobiaseigen ,

Thanks and apologies for the late reply. We were not able to completely solve it however after upgrading to the latest Forum and implementing “preformatted text” option in posts, it improved.

It’s sometimes hard to replicate for example  
-if I Impersonate a user who is having this problem and try to post it, it’s being posted.  
-it doesn’t for for 3 tries then works on the 4th try.

Accordingly we are being forced to offer some unsexy troubleshooting methods such as trying again or posting the text first then editing and adding the code block or URL.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [December 16, 2025, 3:25pm UTC](https://meta.discourse.org/t/unable-to-post-topic-with-code-block/385018/6 "2025-12-16T15:25:19Z")

</div>

Thanks for getting back in touch! Does it work in [safe mode](https://meta.discourse.org/t/53504?silent=true)? You didn’t answer my question so maybe you didn’t try it?
