Compare commits

..
Author SHA1 Message Date
Kara Engelhardt adff182f2d Fix pdf editor crashing if font is missing (Z#23254593)
To reproduce, create a layout with a textcontainer with an unknown font name, then edit the content of that textcontainer. Since the font is unknown, the value of the fontfamily-select-element is null, which breaks fabric's font rendering, which assumes that the fontFamily is always a string
2026-11-19 20:10:04 +01:00
5 changed files with 15 additions and 12 deletions

No files matched your search

+1 -1
View File
@@ -91,7 +91,7 @@ dependencies = [
"redis==7.4.*",
"reportlab==5.1.*",
"requests==2.34.*",
"sentry-sdk==2.75.*",
"sentry-sdk==2.71.*",
"sepaxml==2.7.*",
"stripe==7.9.*",
"text-unidecode==1.*",
+2 -2
View File
@@ -79,8 +79,8 @@ class WaitingListEntryEditForm(I18nModelForm):
self.fields['name_parts'] = NamePartsFormField(
max_length=255,
required=self.event.settings.waiting_list_names_required,
scheme=self.event.settings.name_scheme,
titles=self.event.settings.name_scheme_titles,
scheme=self.event.organizer.settings.name_scheme,
titles=self.event.organizer.settings.name_scheme_titles,
label=_('Name'),
)
else:
+4 -4
View File
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-10-28 10:48+0000\n"
"PO-Revision-Date: 2026-11-19 18:00+0000\n"
"Last-Translator: Tim <plicnetwork@gmail.com>\n"
"PO-Revision-Date: 2026-10-29 17:00+0000\n"
"Last-Translator: CVZ-es <damien.bremont@casadevelazquez.org>\n"
"Language-Team: Spanish <https://translate.pretix.eu/projects/pretix/pretix/"
"es/>\n"
"Language: es\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 2026.11.2\n"
"X-Generator: Weblate 2026.10.1\n"
#: pretix/_base_settings.py
msgid "English"
@@ -29522,7 +29522,7 @@ msgstr ""
"Le hemos reembolsado {amount} por su pedido.\n"
"\n"
"Puede utilizar el código de la tarjeta regalo {giftcard} para pagar futuras "
"reservas.\n"
"compras en nuestra tienda.\n"
"\n"
"El equipo de {event}"
+3
View File
@@ -47,3 +47,6 @@ class Paypal2App(AppConfig):
def ready(self):
from . import signals # NOQA
def is_available(self, event):
return 'pretix.plugins.paypal' not in event.plugins.split(',')
@@ -87,7 +87,7 @@ fabric.Textcontainer = fabric.util.createClass(fabric.Rect, {
fontSize: fontSize,
lineHeight: this.lineHeight,
fill: this.fill,
fontFamily: this.fontFamily,
fontFamily: this.fontFamily || '',
fontWeight: this.fontWeight,
fontStyle: this.fontStyle,
text: text,
@@ -377,7 +377,7 @@ var editor = {
o.set('fill', 'rgb(' + d.color[0] + ',' + d.color[1] + ',' + d.color[2] + ')')
o.set('fontSize', editor._pt2px(d.fontsize))
o.set('lineHeight', d.lineheight || 1)
o.set('fontFamily', d.fontfamily)
o.set('fontFamily', d.fontfamily || '')
o.set('fontWeight', d.bold ? 'bold' : 'normal')
o.set('fontStyle', d.italic ? 'italic' : 'normal')
o.content = d.content
@@ -407,7 +407,7 @@ var editor = {
o.set('fill', 'rgb(' + d.color[0] + ',' + d.color[1] + ',' + d.color[2] + ')')
o.set('fontSize', editor._pt2px(d.fontsize))
o.set('lineHeight', d.lineheight || 1)
o.set('fontFamily', d.fontfamily)
o.set('fontFamily', d.fontfamily || '')
o.set('fontWeight', d.bold ? 'bold' : 'normal')
o.set('fontStyle', d.italic ? 'italic' : 'normal')
o.downward = d.downward || false
@@ -812,7 +812,7 @@ var editor = {
o.set('fill', $('#toolbox-col').val())
o.set('fontSize', editor._pt2px($('#toolbox-fontsize').val()))
o.set('lineHeight', $('#toolbox-lineheight').val() || 1)
o.set('fontFamily', $('#toolbox-fontfamily').val())
o.set('fontFamily', $('#toolbox-fontfamily').val() || '')
o.set('fontWeight', $('#toolbox').find('button[data-action=bold]').is('.active') ? 'bold' : 'normal')
o.set('fontStyle', $('#toolbox').find('button[data-action=italic]').is('.active') ? 'italic' : 'normal')
var align = $('#toolbox-align').find('.active').attr('data-action')
@@ -856,7 +856,7 @@ var editor = {
o.set('fill', $('#toolbox-col').val())
o.set('fontSize', editor._pt2px($('#toolbox-fontsize').val()))
o.set('lineHeight', $('#toolbox-lineheight').val() || 1)
o.set('fontFamily', $('#toolbox-fontfamily').val())
o.set('fontFamily', $('#toolbox-fontfamily').val() || '')
o.set('fontWeight', $('#toolbox').find('button[data-action=bold]').is('.active') ? 'bold' : 'normal')
o.set('fontStyle', $('#toolbox').find('button[data-action=italic]').is('.active') ? 'italic' : 'normal')
var align = $('#toolbox-align').find('.active').attr('data-action')