-
Notifications
You must be signed in to change notification settings - Fork 219
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
When $config['url_shortening_use'] is set to off, it should not be displayed at all #559
Comments
@PeGaSuS-Coder : Could you share your config (making sure you clear out your private credentials etc). I personally couldn't replicate this but it seems likely that it could be the theme you're using. |
@PeGaSuS-Coder - I'm a bit confused too. Initially I thought it could have been one of the changes I'd made on my fork ( https://github.com/krayon/stikked/tree/main ) but I just tested with the latest here and your config (for the most part) and can't replicate the issue 😕 The only thing I could suggest is trying the literal value The code here ( htdocs/application/models/Pastes.php, line 155 onwards ) shows: if ($url_shortening_api !== false) {
if (in_array($url_shortening_api, $API_DB, true)) {
} else {
$shorturl = false;
}
} else {
// Backward compatibility - Falling back to legacy mode
$config_yourls_url = $this->config->item('yourls_url');
if ($config_yourls_url) {
...
} else {
//use gdgw
$url = urlencode($url);
$config_gwgd_url = $this->config->item('gwgd_url');
...
Later, when it comes time to render, the theme you're using "bootstrap" ( htdocs/themes/bootstrap/views/view/view.php, line 40 to 42 ) , checks for not empty ( <?php if(!empty($snipurl)){?>
<div class="detail"><div class="item"><?php echo lang('paste_shorturl');?> </div><a href="<?php echo $snipurl; ?>"><?php echo htmlspecialchars($snipurl) ?></a></div>
<?php }?>
Thus, the only way I think that you could be getting what you're seeing is if something is turning your Sidenote: I notice the config you shared's comments are missing URLs and your |
the The issue happens when you create a paste and don't check the I've also tried with the values of Cheers |
Small heads up: Apparently the issue happens when using PostgreSQL as database. Using sqlite seems to work as expected. Any ideas? Feel free to see it live on my instance Current
|
If you set $config['url_shortening_use'] to false, the
Shorturl
var(?) is still shown with a value offalse
and clicking on the value leads us to a 404 Page not found.It should behave like $config['qr_enabled'] which doesn't display any value at all when set to
false
.Here is an example of the above behavior.
Cheers!
The text was updated successfully, but these errors were encountered: