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

Empty home/index page and all photos gone #3178

Open
jeremycherfas opened this issue Dec 27, 2023 · 12 comments
Open

Empty home/index page and all photos gone #3178

jeremycherfas opened this issue Dec 27, 2023 · 12 comments

Comments

@jeremycherfas
Copy link

While trying to do this:

Upgrade to latest commit in dev 604d55c

I encountered this error:

My home page https://stream.jeremycherfas.net is now completely blank.
Individual posts, like this one are present but the images (and all other images, appear to have vanished.

Some other notes:

The Uploads folder is still present; I took care not to overwrite it. There is a folder 34d735f13a45e96ad37ed1bdfd08be1b within Uploads that I think contains all the images, but I do not know how to check whether Known is looking in that particular folder for images.

Give us some context:

  • It'd also be really handy if you could tell us the contents of your version.known
    file: version = '1.6.1' build = 2023111501
  • What database are you using? (e.g. mongo, mysql, postgres)
    mysql
  • Any warnings or errors in your admin/diagnostics page?
    No warnings, but I notice that the full diagnostic contains 'dbstring' => 'mongodb://localhost:27017', although I am using mysql. I do not know whether this makes any difference.
  • If this is a programming bug, can you include examples of any Micropub / API calls / webhook pings you make? Otherwise please don't worry about what this means!
  • Bonus points - are you able to illustrate the issue with a unit test? If so, submit it as a pull request!
@benwerd
Copy link
Member

benwerd commented Dec 28, 2023

Hmm. Is your configuration/config.ini file still intact? If not it's possible that the update overwrote it.

You can create a new one with the following values:

database = 'MySQL'
dbname = 'your database name'
dbpass = 'your database password'
dbuser = 'your database username'
dbhost = 'your database hostname'

filesystem = 'local'
uploadpath = 'full path to your Uploads folder'

@jeremycherfas
Copy link
Author

jeremycherfas commented Dec 28, 2023

config.ini is still intact.

# This configuration file was created by Known's installer.

database = 'MySQL'
dbname = 'jc_withknown'
dbpass = 'pw is correct'
dbuser = 'user is correct'
dbhost = 'mysql.stream.jeremycherfas.net'

filesystem = 'local'
uploadpath = '/home/jeremygrav/stream.jeremycherfas.net/Uploads/'
session_hash_function = 'md5'
Loglevel = 4
debug = true

If it were not, would the site be able to display individual posts?

The bulk of the uploads are in home/jeremygrav/stream.jeremycherfas.net/Uploads/34d735f13a45e96ad37ed1bdfd08be1b and there are four additional folders under Uploads that contain cryptically named files. I assume Known created those.

Later: as a test I added a new photo and it shows up, but I am at a loss to understand where it was stored.

@benwerd
Copy link
Member

benwerd commented Dec 31, 2023

Sorry for delay. Your site is returning a 500 error. Is anything showing up in your web server logs? A PHP error should be illuminating.

If there's sensitive info in there feel free to take this to email: ben@benwerd.com

@jeremycherfas
Copy link
Author

I too have had to delay. The most obvious error is this:

[Tue Jan 02 05:58:05.270831 2024] [fcgid:warn] [pid 355689:tid 140192673416960] [client 173.236.201.69:40570] mod_fcgid: stderr: PHP Fatal error: Declaration of IdnoPlugins\\Checkin\\Checkin::jsonSerialize() must be compatible with Idno\\Common\\Entity::jsonSerialize(): mixed in /home/jeremygrav/stream.jeremycherfas.net/IdnoPlugins/Checkin/Checkin.php on line 113

I just re-uploaded a fresh copy of the Checkin plugin before getting that error. The same error was present before uploading the fresh copy.

@benwerd
Copy link
Member

benwerd commented Jan 2, 2024

Got it - that's helpful. Thanks! This points to a need to update the jsonSerialize implementation in all non-core plugins (checkin isn't considered core anymore). I'll make this change today and you should see an improvement.

@jeremycherfas
Copy link
Author

Great. I look forward to the results.

@benwerd
Copy link
Member

benwerd commented Jan 3, 2024

The signature should be fixed now. I'm curious if that fixed it for you?

@jeremycherfas
Copy link
Author

jeremycherfas commented Jan 3, 2024

Thanks. I can confirm that this release fixed the issue of the home page being blank. I noticed that in the new version, css folder is now called CSS and idno folder is now called Idno.

Can I delete the old versions?

There remain problems with Checkins (not using correct Stamen maps provider and not recognising a location). I will try and see whether I can make the necessary changes to the current version of the plugin.

Also, all images are still missing, including things like profile avatar images. I can confirm that my Uploads folder is present with home/jeremygrav/stream.jeremycherfas.net/Uploads/34d735f13a45e96ad37ed1bdfd08be1b and that Uploads is 179.2 MB in size, which suggests that the image data is present there.

How can I point Known to the correct location for image data? (Or should I open a new issue for that?)

@jeremycherfas
Copy link
Author

jeremycherfas commented Jan 3, 2024

There remain problems with Checkins (not using correct Stamen maps provider and not recognising a location). I will try and see whether I can make the necessary changes to the current version of the plugin.

I updated the map tile provider as I had previously done in my own fork and Checkin is now functioning as expected.

Not sure how to create a pull request fir this, but my commit 5232a5 at https://github.com/jeremycherfas/known contains the necessary changes. I made the changes to tile.stamen.js and renamed that to tile.stamen.js.min

Hope that helps.

@mediaformat
Copy link

Just setup a server and running into the images issue.

No warnings, but I notice that the full diagnostic contains 'dbstring' => 'mongodb://localhost:27017',

Same, though I have mongodb on this machine, it doesn't seem to have been used by known.

@benwerd
Copy link
Member

benwerd commented Jan 9, 2024 via email

@jeremycherfas
Copy link
Author

Any progress on this?

I can confirm that new photo uploads are going into ~/Uploads/stream.jeremycherfas.net/ and are displaying correctly.

Old images are all in ~/Uploads/34d735f13a45e96ad37ed1bdfd08be1b/.

In config, I have uploadpath = '/home/jeremygrav/stream.jeremycherfas.net/Uploads/' and that has not changed since I first installed Known.

Is there any way I can copy the old existing data to the new folder so that they will be displayed on my site?

Thanks

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