Inventory & Requests

Fixed now.

1 Like

It’s not something we can fix since it is intentionally that way by Discourse. But you can do the same transformation that Discourse does to calculate the final URL for img tags from the upload:// URL. I’ll show how it works with one example:

Let’s say we have the following upload URL and a corresponding so-called “cooked” URL:

upload://w6Q793RK3Xl2Tjw1IoVXzmv3X00.jpeg
https://edgeryders.eu/uploads/default/original/2X/e/e10b857825d31d2c8479e246704de45ff241da44.jpeg

The cooked URL contains the hostname, directory uploads/default/original/2X, then a directory with one letter conforming to the first letter of the image filename, and then the image file basename, and the original file extension. The non-obvious part is to create the image filename. This is done by interpreting the basename of the upload URL w6Q793RK3Xl2Tjw1IoVXzmv3X00 as a Base62 number with character set 0-9 , a-z , A-Z and convert it to a Base16 number.

Discourse uses the base62-rb gem library for this purpose, and I just tried that conversion successfully as follows in IRB (an interactive Ruby shell):

$ gem install base62-rb
$ irb
irb(main):001:0> require 'base62-rb'
=> true
irb(main):004:0> Base62.decode("w6Q793RK3Xl2Tjw1IoVXzmv3X00").to_s(16)
=> "e10b857825d31d2c8479e246704de45ff241da44"

So your task would be to do the same in JavaScript. For reference, the place where Discourse itself does this is models/upload.rb line 277:

1 Like

Thanks for the explanation!

ping @owen could you please check the pictures in these two form sets? For some reasons they do not work event so I used and URL. What do I do wrong?

+ and much more important on the top of the tell.form it shows the date the teext souce post was made, which is in conflict with the date of the actual event. can you remove this? (Maybe in general)

ping @owen could you please check the pictures in these two form sets? For some reasons they do not work event so I used and URL. What do I do wrong?

@Maria it looks like they display fine?

  • and much more important on the top of the tell.form it shows the date the teext souce post was made, which is in conflict with the date of the actual event. can you remove this? (Maybe in general)

Yep, that’s done now.

1 Like

Hi,

I have seen this post has already its form but it contains a broken link and I do not know how to correct it. The link under “alien economy on Earth” should point to this page and not to the empty one where it points now.
Thanks

ping @owen @MariaEuler

Works for me ???

Weird. If I click it on the form (not on the original page) it takes me here which appears to be an empty page.

Not weird at all. On the form, the link points to https://tell.edgeryders.eu/t/13876 (which is obviously empty), instead of https://edgeryders.eu/t/13876. If you have edit privileges, change it. If not, ask @owen. It might even be a bug, if the Webkit adds a default first part of the URL.

Yes, that is why I posted. I do not know how to correct that because I am not yet that familiar with the Discourse to go mess with it.

this link is just the Edgeryders Forms with 13876 wich is the number at the end of the page it points towards: The Catalan Integral Cooperative: another alien economy on Earth?. this is not how the forms work. YOu have to set up the code post, in the code post you insert the number from the post it is supposed to direct to and the tell.from address then uses the number on the end of that code post.

see the step by step guide here:

and once a form is generated it should be added to the inventory here with those links:

  1. tell.form link
  2. link to code thread for this form
  3. link to page it points to + evt. link to post the text is sourced from

this makes troubleshooting a lot easier

so the dead link you are refering to lacks a codepost. NO idea if it was made and just the= wron number used or if it was not made.

1 Like

this way we are linking directly to the post, which is absolutely fine if you do not want to link to a form. Was it meant to got to a form or not?

IMO only to the post is ok. I think two forms that lead to the same event can only confuse the eventual user

agreed

where is the code source for that form? so it can be changed.

This is the post where it comes from.

but in this post the link works, and in the form not. Ah, ok, this is why @owen has to check it.

1 Like

@ivanc @MariaEuler

It’s not an issue with the forms software that needs to be fixed - all the form does is render the text from a post on platform - and it does that in a very literal manner. That means any errors or shorthand that are in that post, will be rendered in the form text. If you go to the source post, you’ll see the link is not an absolute link:

Screenshot 2020-10-21 at 21.12.08

That may be ok on the discourse platform, but if it’s being rendered in a separate application on a different domain and server, a relative url will remain a relative url to that domain. The same applies to images, a relative path will not work as we saw last week.

Tldr: change [alien economy on Earth](/t/13876) to [alien economy on Earth](https://edgeryders.eu/t/13876) and you’re good to go.

Hope that clears it up!

1 Like

Thank you

1 Like

hello, @MariaEuler, could you produce a tell.form for this, please?
We need a signup section for the webinar (in the first days of December).