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

Diagnostic Page Project #2340

Closed
PopVeKind opened this issue Dec 15, 2017 · 8 comments
Closed

Diagnostic Page Project #2340

PopVeKind opened this issue Dec 15, 2017 · 8 comments

Comments

@PopVeKind
Copy link
Contributor

The Project

The Diagnostic Page Project is actually a companion to the Full-fledged installer Project #1254

Their purposes are as follows:

  1. To make configuring YOURLS easy.
  2. To eliminate configuration errors.
  3. To reduce code bloat caused by catching, or fixing, configuration errors.
  4. To Improve YOURLS Performance!
    No code is faster than no code!

Whereas the Full-fledged installer works during installation, the Diagnostic Page is for existing sites, including manual modification of the config page.

@ghost
Copy link

ghost commented Dec 15, 2017

Hey @PopVeKind, thanks for opening an issue!

Unfortunately, it seems you are missing information from the issue template.
Make sure it has all the necessary details as described in our contribution guidelines.

@PopVeKind
Copy link
Contributor Author

The Diagnostic Page

The Diagnostic Page would be located in the Admin area and would contain the following sections.

  1. ERRORS: Repairing The Configuration
  2. WARNINGS: Possible Problems
  3. Technical Details Regarding My Environment

@PopVeKind
Copy link
Contributor Author

ERRORS: Repairing The Configuration

This Section produces advice to fix detected errors.

The Output would be something like this:

  • YOURLS_SITE = https://sho.rt/y/ - ERROR: Remove the last (right) slash.
  • config.php file found in /includes/ directory. ERROR: Move to /user/ directory.
  • YOURLS_DB_PASS - ERROR: MISSING - use config-sample.php to create a new config file.
  • YOURLS_DB_USER - ERROR: MISSING - use config-sample.php to create a new config file.
  • YOURLS_DB_NAME - ERROR: MISSING - use config-sample.php to create a new config file.
  • YOURLS_DB_HOST - ERROR: MISSING - use config-sample.php to create a new config file.
  • YOURLS_DB_PREFIX - ERROR: MISSING - use config-sample.php to create a new config file.

@PopVeKind
Copy link
Contributor Author

WARNINGS: Possible Problems

This Section produces advice on detected warnings. These may or may not be errors.

The Output would be something like this:

  • YOURLS_DB_PASS = your db password - WARNING: Check and/or Correct This.
  • YOURLS_DB_USER = your db user name - WARNING: Check and/or Correct This.
  • YOURLS_DB_NAME = yourls - WARNING: Check and/or Correct This.
  • YOURLS_DB_HOST = localhost - WARNING: Check and/or Correct This.
  • YOURLS_DB_PREFIX= yourls_ - WARNING: Check and/or Correct This.

@PopVeKind
Copy link
Contributor Author

Technical Details Regarding My Environment

This Section's Output should be copy/paste into an issue for a support request.

  1. YOURLS version:
  2. Plugins enabled:
  3. Server OS & version: Ubuntu, FreeBSD, etc.
  4. Web Server & version: Nginx, Apache, etc.
  5. PHP version:
  6. DB & version: MariaDB, MySQL, etc.
  7. Other Information

@PopVeKind
Copy link
Contributor Author

Admin Default Suggestion

I suggest that when it is completed, we make the Diagnostic Page the default page after login. This will help a lot of noobs find the problems with their sites.

@LeoColomb
Copy link
Member

@PopVeKind Wow wow wow, please keep in mind each time you're posting a new comment you're sending a mail to about 300 people following this repo.
So please keep it simple and please keep it in a single post as much as possible.

Thanks! 👍

@ozh
Copy link
Member

ozh commented Dec 15, 2017

All of this isn't stupid ideas at all, but I don't think this is something we need.

Regarding what you call errors: they should simply halt at install. There's no need to code something to produce output and analysis, let's just die with an error message as it's done now.

  • Extra trailing slash is just a cosmetic issue ;
  • config in /includes/ instead of /user/ is legacy but OK (98.3% in "/user" as of writing: let's not code something to deal with less than 2% of installs, most of which may probably be abandoned or dead since this setting goes back to the very first versions);
  • DB settings errors just won't work anyway.

Regarding what you call warnings, I don't think of one single thing that we should output as a warning. Either it works, then fine, or it doesn't, then die with an error.

Regarding the technical details: I think that's typically plugin territory. But most errors make YOURLS die before it can even load plugins. Also, the very very vast majority of users simply never open a support request or trouble issue (roughly 2000 issue vs more than 100K install, again let's not code something for less than 2% of users)

@ozh ozh closed this as completed Dec 15, 2017
@YOURLS YOURLS deleted a comment Dec 15, 2017
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

3 participants