Before asking for help please read "How to request help" by clicking on that tab above here.
  • Page:
  • 1

TOPIC:

My images are uploaded but not visible 3 days 23 hours ago #1

  • JeanPhilippe
  • JeanPhilippe's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 21
Hi friends,
After a long period using v 1.7.16, I decided to migrate to v 2.0.11.
First I created a copy of 1.7.16 in another place of my server (following instructions to move to another server : new directory, new bbd). No problem. I was able to use and modify separately the 2 webtrees.
Next I updated my copy from 1.7.16 to 1.7.17. No problem.
And next I migrated from 1.7.17 to 2.0.11.
All seems to be correct and I can navigate in the 2.0.11 version without problem.
But... when I try to upload an image (from the screen below), When I clic on Save button, nothing happens.
I can't find the picture in medias. But when I look at my server, I see taht the picture is uploaded.
I supposed that it was a permission question but changing permission has no effect.
My data folder is data/ and my media folder is media/

I spend hours on the problem but I don't understant.

Could you help me, please?
Webtree 1.7.17 / 2.0.11
PHP Version 7.3.27
Attachments:

Please Log in or Create an account to join the conversation.

My images are uploaded but not visible 3 days 5 hours ago #2

  • Bogie
  • Bogie's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Life is good!
  • Posts: 517
Does your data/media/ folder exist under your *new* installation on your server and has sufficient rights?
Bogie
webtrees 2.0.11 | PHP 7.4.10 | MySQL 5.7.28 | Apache

Please Log in or Create an account to join the conversation.

My images are uploaded but not visible 3 days 5 hours ago #3

  • JeanPhilippe
  • JeanPhilippe's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 21
First, thank you for trying to help me.
The media foder exists an is drwxr-xr-x for permissions

But I have made a new full install. It seems to be better but now, when I clic on Save I have an error :

SQLSTATE[HY000]: General error: 1364 Field 'm_ext' doesn't have a default value (SQL: insert into `wt_media` (`m_id`, `m_file`, `m_gedcom`) values (M2157, 7, 0 @M2157@ OBJE

But I dont know what is this default value for "m_ext"

Edit : I've just seen this answer : www.webtrees.net/index.php/en/forum/help...display-photos#83228
but I don't know what to to install a previous version 2 (ie 2.0.10) ?
Webtree 1.7.17 / 2.0.11
PHP Version 7.3.27

Please Log in or Create an account to join the conversation.

Last edit: by JeanPhilippe.

My images are uploaded but not visible 3 days 1 hour ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14084
> when I clic on Save I have an error :

Is this the full error? Is there any other information with it?

> But I dont know what is this default value for "m_ext"

The database from 1.7 had a column m_ext.
The database from 2.0 does not.

So, you seem to be using 2.0 with a database from 1.7

This shouldn't be possible. webtrees should automatically upgrade the database structure.

What version of webtrees are you using?
What value do you have for WT_SCHEMA_VERSION in the table wt_site_setting?
What is the structure of the table wt_media?
What is the structure of the table wt_media_file?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

My images are uploaded but not visible 2 days 23 hours ago #5

  • JeanPhilippe
  • JeanPhilippe's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 21
Sorry for this late answer. I was doing a fresh install.
Step 1 - create a copy of my own webtrees (1.7.17)
- I created a new database on my server
- I imported in my original 1.7.17 db (with phpmyadmin)
- I copied standard files of 1.7.17 in a new folder (with Filezilla)
- I copied my 1.7.17 data/ folder in the standard 1.7.17 (except config.ini.php)
- I accessed webtrees (with Vivaldi) fill the access values (db, pwd etc..)
- All was ok, the new install of 1.7.17 works fine and I can import images.

Step 2 : migrate to 2.0.11
- I copied all standard files of 2.0.11 over the files of the 1.7.17 (ask to filezilla to replace all)
- I accessed webtrees and waited during db updating
- All seems to be good and I can navigate. But when I try to import images, I have the same problem that at the beginning. Nothing happens when I clic 'Save" button. I stay on "create mulimedia object". But the image is on the server but inivisible. I tried then to give 777 permissions to data folder on the server. But same result.

I don't understand...
Webtree 1.7.17 / 2.0.11
PHP Version 7.3.27

Please Log in or Create an account to join the conversation.

My images are uploaded but not visible 2 days 23 hours ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14084
When you click "save", data is sent to the server.

I guess there is an error.

Use the information in webtrees.net/faq/xhr to find this error.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Last edit: by fisharebest.

My images are uploaded but not visible 2 days 22 hours ago #7

  • JeanPhilippe
  • JeanPhilippe's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 21
Thank you for help.
I followed instructions (in chrome).
The error in the XHR filter is "SQLSTATE[HY000]: General error: 1364 Field 'm_ext' doesn't have a default value (SQL: insert into `wt_media` (`m_id`, `m_file`, `m_gedcom`) values (X1, 7, 0 @X1@ OBJE...."

I do not understand why ther is a request for this field m_ext. My control panel tells me 2.0.11 for the version installed
Webtree 1.7.17 / 2.0.11
PHP Version 7.3.27

Please Log in or Create an account to join the conversation.

My images are uploaded but not visible 2 days 22 hours ago #8

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14084
> What value do you have for WT_SCHEMA_VERSION in the table wt_site_setting?
> What is the structure of the table wt_media?
> What is the structure of the table wt_media_file?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

My images are uploaded but not visible 2 days 22 hours ago #9

  • JeanPhilippe
  • JeanPhilippe's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 21
> What value do you have for WT_SCHEMA_VERSION in the table wt_site_setting?
44

> What is the structure of the table wt_media?
> What is the structure of the table wt_media_file?
Webtree 1.7.17 / 2.0.11
PHP Version 7.3.27
Attachments:

Please Log in or Create an account to join the conversation.

My images are uploaded but not visible 2 days 7 hours ago #10

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14084
One of the upgrade scripts does two things:

1) it creates the table wt_media_file
2) it deletes 4 columns from wt_media

See github.com/fisharebest/webtrees/blob/2.0...hema/Migration37.php

You have the table wt_media_file - so this script must have run...
...but you still have the 4 columns

I cannot think how that might happen - although it would be very good to know, so that I can prevent the situation from happening in future.

So, perhaps you simply need to delete the 4 columns manually.
See lines 84-95 of the script for the names of the columns.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

My images are uploaded but not visible 2 days 7 hours ago #11

  • JeanPhilippe
  • JeanPhilippe's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 21
Thank you for your help.
Maybe be it is due to the direct jump from 1.7.17 to 2.0.11. It could be better to install first an earlier 2.0 version ?

So If I understand, accoding to the script migration37.php I have to delete (with phpmyadmin ?) the columns 'm_filename', 'm_ext', 'm_type' and 'm_titl' of 'media' table. Is it right (sorry but I'm not easy with that) ?

Edit : I deleted colums. But I have the error remaining. "Field 'm_ext' doesn't have a default value (SQL: insert into `wt_media` (`m_id`, `m_file`, `m_gedcom`) values.... ". It is curious because 'm_ext' is not in the request!
Webtree 1.7.17 / 2.0.11
PHP Version 7.3.27

Please Log in or Create an account to join the conversation.

Last edit: by JeanPhilippe.

My images are uploaded but not visible 2 days 7 hours ago #12

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14084
> Maybe be it is due to the direct jump

The same upgrade script is run for both an upgrade an a new install.

> It is curious because 'm_ext' is not in the request!

The column m_ext was a non-null (i.e. mandatory) field.

webtrees does not include it in the request, because it expects that the column was deleted.

But if you still have the error message, then you must still have the column.

You said that you deleted it - but it is still there?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

My images are uploaded but not visible 2 days 7 hours ago #13

  • JeanPhilippe
  • JeanPhilippe's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 21
I apologize. I deleted fields in another database (I have many for tests).
Now it seems to be good.
Thank you very much.
Webtree 1.7.17 / 2.0.11
PHP Version 7.3.27

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum