Giter Club home page Giter Club logo

Comments (24)

SilentDude80 avatar SilentDude80 commented on June 24, 2024 1

Wow, that's the fix for my issue #2484 - thanks a lot, @lagasss !

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024 1

@lagasss @SilentDude80 could you please test this fix: 0a904c1

from phpmyfaq.

SilentDude80 avatar SilentDude80 commented on June 24, 2024 1

Ok, null Ahnung davon - dann warte ich lieber auf RC2 ;-)

from phpmyfaq.

f-roscher avatar f-roscher commented on June 24, 2024 1

@lagasss @SilentDude80 could you please test this fix: 0a904c1

@thorsten, I inserted your fixed method cleanUpContent to our running 3.1.14 and the pictures are shown again. Without that fix they had been missing.
Thanks!

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

Removing this line of code opens potential security risks.

from phpmyfaq.

lagasss avatar lagasss commented on June 24, 2024

Removing this line of code opens potential security risks.

ok but I guess the sanitize function has to be reviewed because keeping it there breaks the display of html whenever they are images.

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

Yes, will work on it after my holiday

from phpmyfaq.

SilentDude80 avatar SilentDude80 commented on June 24, 2024

The sanitize problem is also present in 3.2.0-RC, although it behaves a little different: Images are partially displayed, but then suddenly rest of the image and rest of the articles content is cut off... commenting it out makes everything work...

from phpmyfaq.

SilentDude80 avatar SilentDude80 commented on June 24, 2024

Cannot test in 3.1.14 at the moment, since I have it at my company and now I'm on holidays too and have no access ;-)
But I did a quick test for 3.2.0-RC which I host at home and here it throws an error, although I replaced "Sanitizer" with "HtmlSanitizer" which should be the correct variable name in 3.2.0-RC:

phpMyFAQ Fatal `error`
Uncaught exception: 'Error'

Message: 'Call to undefined method Symfony\Component\HtmlSanitizer\HtmlSanitizer::create()'

Stack trace:

#0 /var/www/html/phpmyfaq/faq.php(110): phpMyFAQ\Helper\FaqHelper->cleanUpContent()
#1 /var/www/html/phpmyfaq/index.php(793): require('...')
#2 {main}

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

You can't use that fix for 3.2 as we switched libraries for 3.2

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

@SilentDude80 This is the fix for 3.2: 5495a55

from phpmyfaq.

SilentDude80 avatar SilentDude80 commented on June 24, 2024

@SilentDude80 This is the fix for 3.2: 5495a55

Does not work, unfortunately:

Uncaught exception: 'Error'

Message: 'Object of type Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig is not callable'

Stack trace:

#0 /var/www/html/phpmyfaq/faq.php(110): phpMyFAQ\Helper\FaqHelper->cleanUpContent()
#1 /var/www/html/phpmyfaq/index.php(793): require('...')
#2 {main}

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

@SilentDude80 please try to revert to the original version of the file and try it again. I just added the missing options to reduce the impact of the sanitizer

from phpmyfaq.

SilentDude80 avatar SilentDude80 commented on June 24, 2024

@SilentDude80 please try to revert to the original version of the file and try it again. I just added the missing options to reduce the impact of the sanitizer

Ich muss jetzt mal auf Deutsch schreiben - Ich habe jetzt die ganze FaqHelper-Datei durch die von GitHub ersetzt... Mit einem kleinen Bild (das Logo von phpMyFAQ, also so Icon-Größe) hat es funktioniert. Sobald ich aber ein bissl größeres Bild verwende, kriege ich komische Fehlermeldungen:

image

Habs aber überprüft - das Bild, welches ich per Copy&Paste eingefügt habe, ist fehlerfrei im /images-Ordner gelandet.

Beim Testen ist mir auch noch aufgefallen, dass wenn ich diesen Test-Artikel bearbeite und speichere, verschwindet er mir von der Startseite, ist also weder in dem Bereich "Neue FAQs" zu sehen wie vor dem Bearbeiten, noch kann ich mich über die Kategorie durchhangeln - ist wie von der Bildfläche verschwunden. Nur über den Admin-Bereich komme ich dann noch in den Bearbeitungsmodus des Artikels... das ist aber wohl ein Fall für eine separate Fehlermeldung...

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

@SilentDude80 Der Screenshot hat aber nichts mit dem Bug zu tun.

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

@SilentDude80 Ich habe das nun mal mit einem sehr großen Bild (3,5 MB groß) probiert. Per Drag n Drop kommen Fehlermeldungen von TinyMCE, der Sanitizer verschluckt sich auch dran. Per Upload geht es und der Sanitizer stellt es dann auch dar. Der Commit fixt die Fehlermeldungen. Um es selbst zu testen, musst du aber den JavaScript-Code neu bauen.

from phpmyfaq.

SilentDude80 avatar SilentDude80 commented on June 24, 2024

@SilentDude80 Der Screenshot hat aber nichts mit dem Bug zu tun.

Ich weiß, das liegt daran, dass ich im Moment damit kämpfe, überhaupt noch meine FAQ-Artikel angezeigt zu bekommen, um den Fix vom eigentlichen Bug testen zu können:

image

Angeblich 4 FAQs in der Kategorie - angezeigt wird aber nix...

Freigeschaltet/veröffentlicht sind sie alle:

image

Und obwohl auch drei FAQs als wichtig markiert sind, herrscht auf der Startseite in den Bereichen "Wichtige FAQs" und "Neueste FAQ-Beiträge" gähnende Leere:
image

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

Könnte ich einen Dump deiner DB haben?

from phpmyfaq.

SilentDude80 avatar SilentDude80 commented on June 24, 2024

Klar:

dump.zip

Was mir noch aufgefallen ist:
Nachdem ich eine FAQ bearbeitet habe, schaltet diese in der Übersicht automatisch auf "Inaktiv". Ich setze dann zwar den entsprechenden "aktiviert"-Haken wieder, aber an der Sichtbarkeit auf der Startseite ändert das nichts...

Ist "Aktiv/Inaktiv" eigentlich dasselbe wie "Veröffentlicht/Unveröffentlicht" im Editor ?

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

Danke für den Dump, ich schau die Tage rein.

Ist "Aktiv/Inaktiv" eigentlich dasselbe wie "Veröffentlicht/Unveröffentlicht" im Editor ?

ja, es könnte sein, dass das bereits gefixt ist. Ich denke, wir brauchen nen 2. RC

from phpmyfaq.

SilentDude80 avatar SilentDude80 commented on June 24, 2024

Falls es schon gefixt ist - wäre es dann besser ich installiere noch mal den 3.2-Branch von Github ? Die Installation bei mir basiert nämlich auf "https://download.phpmyfaq.de/phpMyFAQ-3.2.0-RC.tar.gz"

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

@SilentDude80 ja, gerne, aber dann musst du mittels Composer und Yarn die externen Bibliotheken installieren und bauen.

from phpmyfaq.

thorsten avatar thorsten commented on June 24, 2024

@SilentDude80 Bug gefunden, ist bereits in der kommenden RC.2 gefixt.

from phpmyfaq.

SilentDude80 avatar SilentDude80 commented on June 24, 2024

@SilentDude80 Bug gefunden, ist bereits in der kommenden RC.2 gefixt.

Merci :-)

from phpmyfaq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.