Page 2 of 7

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 05:26
by mjau-mjau
TAIFUN wrote:Does not work. Ok, this is not a problem for me. I updated the php to php7 for domen of photo gallery.
You mean you could not update with ?force_update? Or do you mean you updated again, and it still didn't work while using PHP 5?

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 05:32
by mjau-mjau
metallissimus wrote:Exactly. I'm glad the content wasn't also overwritten, that would have been really bad.
What "content" was this though if I may ask? By default, the /files/ included in X3 will point to X3's '../content'. Besides, the "update" process will only overwrite files that exist in the ZIP update, everything else will MERGE if there are duplicate folders. It's unclear how you had setup your previous /files/ dir, as this was not originally part of X3 prior to this update.
metallissimus wrote:Naming the root folder of files app "files" is an obvious choice, why would I have named it differently?
Because you clearly have a custom /files/ dir setup possibly pointing to some custom location? This is unclear. To avoid any pollution with the /files/ included in X3, it could be an idea to add your custom Files in a different location, for example /myfiles/ or /f/ or /view/.

The /files/ that comes with X3 for instance, will include "_files/plugins/files.x3-login.php", which forces X3 control panel login inheritance. If you want a public version, you would then set it up in a separate dir instead, without this file.
https://www.photo.gallery/docs/plugins/files-gallery/

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 06:35
by metallissimus
mjau-mjau wrote: It's unclear how you had setup your previous /files/ dir, as this was not originally part of X3 prior to this update.
This is a screenshot of my /files/ directory.
Bildschirmfoto 2022-07-19 um 12.31.44.png
Bildschirmfoto 2022-07-19 um 12.31.44.png (59.06 KiB) Viewed 12074 times
public_html is also the root of my X3 installation.

PS: I am happy to open a thread in https://forum.files.gallery/ if you think this has nothing to do with X3.

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 06:42
by pavel23
Hello,

i have updated to 3.31.1 succesfuly. Installer said "Great Success". But diagnostics failed and website is not working completely anymore.

Browser response:
Parse error: syntax error, unexpected '?' in /data/web/virtuals/XXXXX/virtual/www/pix/app/asset-types/page.inc.php on line 43

What is the proble here and how to fix it please?

Many thanks

Regards
Pavel

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 06:44
by mjau-mjau
metallissimus wrote:This is a screenshot of my /files/ directory.
I think there is some confusion here. You originally asked why the X3 update overwrote your existing Files config. Since Files was only included in this latest release a few days ago, I am assuming that you had installed /files/ gallery BEFORE X3.31.0 was released? This is also why I asked about the purpose of your original /files/ dir, because the one that comes with X3 is tied in with X3 control panel login. That's also why I suggested that you keep your own custom Files installs NOT in the /files/ dir, because this is where X3 will add it's own files app, always tied in with the X3 control panel login. Apart from this, in next X3, I will make sure /files/_files/config/config.php is not overwritten, if you already had a custom config file there.
metallissimus wrote:PS: I am happy to open a thread in https://forum.files.gallery/ if you think this has nothing to do with X3.
As far as I can see, it is related to X3. But I'm not quite sure if there are any remaining problems or questions?

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 06:57
by metallissimus
mjau-mjau wrote: I think there is some confusion here.
There was, but now I understand what you have been trying to tell me. The situation is a bit tricky with those different instances of files "inside" and "outside" of X3. I will move my preexisting files app to another folder.

What is still not quite clear to me: Does X3 on its own make use of the included files app? Or are the two apps completely unconnected, apart from sharing one login?

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 07:49
by mjau-mjau
metallissimus wrote:There was, but now I understand what you have been trying to tell me. The situation is a bit tricky with those different instances of files "inside" and "outside" of X3. I will move my preexisting files app to another folder.
Just to clarify a bit further: 1. The /files/ dir included with X3, will always come with "_files/plugins/files.x3-login.php", and will therefore always inherit login from your X3 control panel. Even if you delete the plugin to make it public, this file would be re-instated when you update X3. Therefore, if you planned to make this dir public (not X3-login), you would need to setup this in a separate dir name, because "/files/" is now kinda reserved by X3, just like the other application dirs. The reason we only include the login-version by default, is because we can't really include public file viewing capabilities without the owners knowledge ... Therefore, adding public Files can easily be done (see docs), but it requires action from the owner. 2. As for overwriting the "_files/config/config.php" file, that was kinda my mistake. It would only have affected anyone (like you) who had already pre-installed Files in the /files/ dir. But for future X3 release, I will have to remove the config file and allow it to get self-generated (when it does not exist), else it will overwrite existing config files (as it did in your case).
metallissimus wrote:What is still not quite clear to me: Does X3 on its own make use of the included files app? Or are the two apps completely unconnected, apart from sharing one login?
Files app is entirely optional, and simply a bonus feature which many will not use or need. I did build some X3 support into Files: 1) Shared thumbnails from X3, 2) Shared X3 license when used with X3 /content/ and 3) Invalidate X3 cache when you use Files to upload/manage files. The "files.x3-login.php" is a Files-plugin provided by default so that Files with file manager features is protected. As noted, we can't provide a public open version by default.

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 10:15
by TristanJo
🤩Thank you. It's working fine.

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 11:52
by TAIFUN
mjau-mjau wrote:
TAIFUN wrote:Does not work. Ok, this is not a problem for me. I updated the php to php7 for domen of photo gallery.
You mean you could not update with ?force_update? Or do you mean you updated again, and it still didn't work while using PHP 5?
I used ?force_update but index page of my photo gallery don`t work. So I switched the site to php7 and the problem is gone.

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 19 Jul 2022, 21:28
by mjau-mjau
pavel23 wrote:i have updated to 3.31.1 succesfuly. Installer said "Great Success". But diagnostics failed and website is not working completely anymore.
This is the same issue as explained earlier in this topic. You need to update your PHP version to 7 (or higher).

Or you can re-run the update as explained here. After updating, go to panel, click SAVE (to refresh cache).

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 20 Jul 2022, 14:51
by trpgforum
Hello Karl

The two changes "Card" and "Breadcrumb" are great new tools.  And also the integrated FilesApp!
Thanks a lot for your fantastic work! As always just top class!


While testing, I noticed that the breadcrumb bar uses the HTML page title (e.g. "makro-1") .and not the "Menu Label" (e.g. "Macrophotos Switzerland"). Unfortunately, this is not really useful for my site - and I suspect for others as well. Can I configure somewhere that the breadcrump bar uses the Menu Label (if filled in) that I entered under Page? This setting would of course be effective for the whole website. This way the breadcrump bar would be a real game changer in complex galleries. 

I will be happy to test all the new functions in the near future. In any case, the first impressions are excellent!

Thanks again and best regards from Basel
Thomas

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 21 Jul 2022, 00:12
by mjau-mjau
Hi Thomas,

Thanks!
trpgforum wrote:While testing, I noticed that the breadcrumb bar uses the HTML page title (e.g. "makro-1") .and not the "Menu Label" (e.g. "Macrophotos Switzerland"). Unfortunately, this is not really useful for my site - and I suspect for others as well. Can I configure somewhere that the breadcrump bar uses the Menu Label (if filled in) that I entered under Page? This setting would of course be effective for the whole website. This way the breadcrump bar would be a real game changer in complex galleries.
Just to be clear, breadcrumbs uses the folder NAME (not page title) and breadcrumbs matches the URL. For example the URL /photos/switzerland/makro/ would create breadcrumbs Photos > Switzerland > Makro. This would normally be most logical and intuitive for the user. I understand your request, but my question to you would be, if you have menu label "Macrophotos Switzerland", why not have URL /macrophotos-switzerland/ instead of /makro-1/? There would only be benefits to users and SEO.

As I posted recently in another breadcrumbs topic:
Breadcrumbs uses the URL to create texts for each breadcrumb. For instance URL /galleries/birds/penguins/ will create breadcrumbs Galleries > Birds > Penguins. There are a few reasons for this:
  1. It's not safe to rely on long page titles to create breadcrumbs.
  2. Breadcrumbs should match URL's for best functionality for humans.
  3. We need to create breadcrumbs on a per-page basis from the URL ... It's too heavy (and unnecessary) to look up the tree structure with PHP and extract title or label for all parent pages (for each page with breadcrumbs).
I can't argue that there could be options for this, but considering #3 in the above, I do need to argue :sunglasses:. There are technical reasons why we use the URL to create the breadcrumbs effectively ... And logically, I don't see any scenario where the URL doesn't produce optimal breadcrumbs, if you plan your URL as you probably should.

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 21 Jul 2022, 01:46
by trpgforum
Thank you very much Karl!

In principle, of course, I agree with you 90%. However, there are indeed cases where this is not quite easy, as the following examples show: 
  1. The page title is called landscapes-usa. This is now translated into Landscapes Usa. Of course, it should be Landscapes USA.
  2. The client forbids changing page titles for SEO reasons or does not want to set up whole series of redirects for cost reasons.
Unfortunately, both cases concern me. Personally, however, I can live with your suggestion to rename the page titles. In fact, this is probably the best solution for SEO. 

For point 1 I have now found a pragmatic solution by converting all entries to small letters (or capital letters) with custom CSS:
Code
.x3-breadcrumbs-primary { text-transform: lowercase ;}
Many thanks and best regards
Thomas

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 21 Jul 2022, 04:29
by mjau-mjau
trpgforum wrote:The page title is called landscapes-usa. This is now translated into Landscapes Usa. Of course, it should be Landscapes USA.
You are right. But I think this is worth the compromise of having a fast solution that effectively creates breadcrumbs from URL. I don't think this case would occur often, and it's just a cosmetic flaw that will not affect function anyway.
trpgforum wrote:The client forbids changing page titles for SEO reasons or does not want to set up whole series of redirects for cost reasons.
As mentioned, breadcrumbs uses folder names (from url) not page titles (which is stored in page.json like labels). If X3 website owner is not interested in correcting their page names (which reflect in the URL, and are important for SEO), why would they spend time correcting labels, which is an additional task? Ultimately, URL should be the name of the page, while titles are only available when you want longer titles with characters not supported in folder names/urls. Logically, folder "names" should be the best option to reflect the page structure as the user sees it, and in terms of string length.

As noted, I'm not saying you don't have a point, but considering the technical aspect, I have decided that breadcrumbs is synched with URL. Just for reference, if we wanted to create breadcrumbs from page "labels" instead, it would work like this for a page /galleries/nature/trees/oak/: X3 would need to loop backwards from current page /oak/, load /{dir}/page.json and extract "menu_label" option. This would have to be done four times, once for each folder in the breadcrumbs structure. Instead of just loading page.json, X3 would have to load 4x page.json files.

This is easy for database-systems like Wordpress, because every detail gets extracted from the database, but it's ineffective in folder-based systems like X3. Considering the minimal advantage (if any), I decided to build breadcrumbs based on URL, and that's that! Labels are not supported unfortunately.

Re: X3.31.0 Cart, Breadcrumbs and Files :lion_face:

Posted: 21 Jul 2022, 04:49
by pavel23
mjau-mjau wrote:
pavel23 wrote:i have updated to 3.31.1 succesfuly. Installer said "Great Success". But diagnostics failed and website is not working completely anymore.
This is the same issue as explained earlier in this topic. You need to update your PHP version to 7 (or higher).

Or you can re-run the update as explained here. After updating, go to panel, click SAVE (to refresh cache).
Thanks! Update re-run didnt help ( i could not see SAVE ..LoL)  but upgrading PHP did the job and website is functional again. Thanks for help