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

Charset problem after update to 1.7.3 #2500

Open
diplatis opened this Issue Jan 26, 2019 · 8 comments

Comments

Projects
None yet
3 participants
@diplatis
Copy link

diplatis commented Jan 26, 2019

Hi,

after updating to 1.7.3 the titles of all original links before the update are showing with weired chars as shown in the screenshot. I didn't change anything in the database.
fireshot capture 44 - yourls your own url shortener i https___e-th es_ - https___e-th es_admin_

@arialypse

This comment has been minimized.

Copy link

arialypse commented Jan 29, 2019

Encounter same problem.

@LeoColomb

This comment has been minimized.

Copy link
Member

LeoColomb commented Jan 30, 2019

@diplatis @arialypse Thanks for your reports!
Could you provide requested additional information? At least:

  • PHP version
  • MySQL version
@arialypse

This comment has been minimized.

Copy link

arialypse commented Jan 31, 2019

Php 7.2.14, MySQL 5.6.42

@diplatis

This comment has been minimized.

Copy link
Author

diplatis commented Jan 31, 2019

Php 7.2.14
MySQL 5.5.62

@LeoColomb

This comment has been minimized.

Copy link
Member

LeoColomb commented Jan 31, 2019

@diplatis @arialypse Thanks.

What if you add the following plugin:

<?php
/*
Plugin Name: Test Charset Change
Plugin URI: https://github.com/YOURLS/YOURLS/issues/2500
Description: Not for stying in production
Version: 1.0
Author: YOURLS
Author URI: https://yourls.org/
*/

// No direct call
if(!defined('YOURLS_ABSPATH')) die();

yourls_add_filter('db_connect_custom_dsn', function (string $dsn): string {
    $dsn_array = explode(';', $dsn);
    array_pop($dsn_array);
    return implode(';', $dsn_array);
});

To add the plugin:

  1. Create a simple directory inside /user/plugins/, for example /user/plugins/charset-test/
  2. Create a empty PHP file inside the new directory
  3. Edit and past the above code.

Ref: d74f160#diff-af40f315420072f2ed3541b84adea495R31

@LeoColomb LeoColomb added the database label Jan 31, 2019

@diplatis

This comment has been minimized.

Copy link
Author

diplatis commented Jan 31, 2019

I get HTTP ERROR 500 when trying to enable the plugin and get the following in the logs:
PHP Parse error: syntax error, unexpected end of file, expecting ',' or ')' in /var/www/vhosts/hidden/httpdocs/user/plugins/charset-test/plugin.php on line 18\n', referer: https://hidden/admin/plugins.php

@LeoColomb

This comment has been minimized.

Copy link
Member

LeoColomb commented Jan 31, 2019

Sorry, my fault, I updated the code above to fix this.

@diplatis

This comment has been minimized.

Copy link
Author

diplatis commented Jan 31, 2019

Nope, no change, not working.
Still charset problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment