Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed HTML when fetching Channels #140

Open
jalcine opened this issue Dec 8, 2021 · 2 comments
Open

Malformed HTML when fetching Channels #140

jalcine opened this issue Dec 8, 2021 · 2 comments

Comments

@jalcine
Copy link

jalcine commented Dec 8, 2021

My Micropub endpoint returns channel information using the object notation. It looks like Quill expects it to be a list of strings/uids instead. My uids aren't too human friendly however. Is it possible for it to check for this and present it accordingly?

HTML of /settings:

<div class="form-group">
          <label for="note_channels"><a href="javascript:reload_channels()">Reload</a></label>
          <div id="channel-container">
            <select class="form-control" name="channel"><html><head><title>Slim Application Error</title><style>body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}h1{margin:0;font-size:48px;font-weight:normal;line-height:48px;}strong{display:inline-block;width:65px;}</style></head><body><h1>Slim Application Error</h1><p>The application could not run because of the following error:</p><h2>Details</h2><div><strong>Type:</strong> ErrorException</div><div><strong>Code:</strong> 2</div><div><strong>Message:</strong> htmlspecialchars() expects parameter 1 to be string, array given</div><div><strong>File:</strong> /web/sites/quill.p3k.io/views/settings.php</div><div><strong>Line:</strong> 100</div><h2>Trace</h2><pre>#0 [internal function]: Slim\Slim::handleErrors()
#1 /web/sites/quill.p3k.io/views/settings.php(100): htmlspecialchars()
#2 /web/sites/quill.p3k.io/vendor/saltybeagle/savant3/Savant3.php(1074): include('/web/sites/quil...')
#3 /web/sites/quill.p3k.io/views/layout.php(71): Savant3->fetch()
#4 /web/sites/quill.p3k.io/vendor/saltybeagle/savant3/Savant3.php(1074): include('/web/sites/quil...')
#5 /web/sites/quill.p3k.io/lib/Savant.php(74): Savant3->fetch()
#6 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/View.php(195): Slim\Extras\Views\Savant->render()
@vikanezrimaya
Copy link

This completely breaks the channel functionality for me. While Kittybox can substitute a "default" channel in scenarios where no channel is specified (This uses some heuristics based on post content, which I don't like, but am forced to deal with), having this broken is an issue.

@vikanezrimaya
Copy link

vikanezrimaya commented Sep 28, 2022

views/settings.php:99-101 replace with check for stringness and if not, use uid as value and name as user-visible name

just taking notes, maybe i'll make a PR if I manage to remember PHP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants