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

Config: Title of the search page must be set based on the site title #3439

Closed
edwinclement08 opened this issue May 30, 2023 · 8 comments
Closed
Assignees
Labels
bug Something isn't working released Available in the stable release

Comments

@edwinclement08
Copy link

1. What is not working as documented?

When setting the PHOTOPRISM_SITE_TITLE environmental variable via PHOTOPRISM_SITE_TITLE, the search page still shows 'Photoprism'.
The other pages like Albums and Favourites show the ' - ' as expected.

2. How can we reproduce it?

Steps to reproduce the behavior:

Run the docker container with PHOTOPRISM_SITE_TITLE env variable set to anything other than Photoprism

3. What behavior do you expect?

The Title of the page to be when on home page

4. What could be the cause of your problem?

Not sure

5. Can you provide us with example files for testing, error logs, or screenshots?

image
image

6. Which software versions do you use?

(a) PhotoPrism Architecture & Build Number: PhotoPrism® CE Build [230514-0b780defb]

(b) Database Type & Version: SQLite

(c) Operating System Types & Versions: Windows

(d) Browser Types & Versions: Firefox, Chrome

(e) Ad Blockers, Browser Plugins, and/or Firewall Software?
No

7. On what kind of device is PhotoPrism installed?

Unraid

(a) Device / Processor Type:
Intel Core i7-3770

(b) Physical Memory & Swap Space in GB
16 GB, 1 GB

(c) Storage Type: HDD

(d) Anything else that might be helpful to know?

Did try to edit options.yml and got the same result.

8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?

No

@edwinclement08 edwinclement08 added the bug Something isn't working label May 30, 2023
@lastzero
Copy link
Member

lastzero commented May 30, 2023

While I recognize that there is room for improvement, this seems to work more or less as intended. Could you additionally try setting PHOTOPRISM_SITE_CAPTION and PHOTOPRISM_APP_NAME to see if/how that changes the title of the page? I'm in a hurry and can't check the code in detail right now, but I remember there is logic that uses all of these values to generate both the toolbar and HTML page titles.

@lastzero lastzero added idea Feedback wanted / feature request needs-analysis Requires further investigation and removed bug Something isn't working labels May 30, 2023
@lastzero lastzero changed the title PHOTOPRISM_SITE_TITLE does not effect the search page, other pages show the set variable Config: PHOTOPRISM_SITE_TITLE does not effect the search page, other pages show the set variable May 30, 2023
@edwinclement08
Copy link
Author

I tried PHOTOPRISM_APP_NAME as well, but that didn't seem to effect the name on the browser. The PHOTOPRISM_SITE_CAPTION I have kept as Browse Your Life and that is not what is shown.
The reason I wanted this functionality is that I have multiple instances of photoprism for my family and it becomes a bit confusing when more than a couple of them are open. All of the pages are titled PhotoPrism.

@lastzero
Copy link
Member

Yeah, so it is possible that overwriting the title with PHOTOPRISM_APP_NAME currently only works in our Plus version, since this might be implemented as a "proof of concept" in the extension we provide to our members. If so, we may eventually add this tiny tweak to our regular version as well.

In the short term, you can also achieve the behavior by adding a line or two of Go if you are comfortable with building from source.

@lastzero lastzero removed the needs-analysis Requires further investigation label May 30, 2023
lastzero added a commit that referenced this issue Jun 2, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero
Copy link
Member

lastzero commented Jun 2, 2023

@edwinclement08 Thanks to your report, I found a line in our frontend code that should not be there and caused a different behavior in our community edition. I apologize for that. After removing this line, I tested it again. For this I started the server as follows (of course you can use environment variables instead):

photoprism --site-title="TITLE" --site-caption="CAPTION" start

To verify the effect of the config values, I've then used this command, which confirms that the site title was applied to the app name:

photoprism --site-title="TITLE" --site-caption="CAPTION" config | grep TITLE 
| app-name               | TITLE            |
| site-title             | TITLE            |

If a site-caption is set, it will be used as page title on the (default) search page:

search-caption

Otherwise, and on all other pages, the configured site title will be used:

albums-title

I would appreciate if you could test it again with this change. An updated development preview build will be available soon!

@lastzero lastzero changed the title Config: PHOTOPRISM_SITE_TITLE does not effect the search page, other pages show the set variable UI: Set page title on the search page based on site config values Jun 2, 2023
@lastzero lastzero changed the title UI: Set page title on the search page based on site config values UI: Set page title on the search page based on site config Jun 2, 2023
@lastzero lastzero self-assigned this Jun 2, 2023
@lastzero lastzero added bug Something isn't working please-test Ready for acceptance test and removed idea Feedback wanted / feature request labels Jun 2, 2023
@lastzero lastzero changed the title UI: Set page title on the search page based on site config Config: Set page title on the search page based on site config Jun 2, 2023
@lastzero lastzero changed the title Config: Set page title on the search page based on site config Config: Set page title on the search page based on site settings Jun 2, 2023
@lastzero lastzero changed the title Config: Set page title on the search page based on site settings Config: Title of the search page must always be set based on the site title Jun 2, 2023
@lastzero lastzero changed the title Config: Title of the search page must always be set based on the site title Config: Title of the search page must be set based on the site title Jun 2, 2023
@lastzero
Copy link
Member

lastzero commented Jun 2, 2023

The release notes have been updated to mention this issue:

https://docs.photoprism.app/release-notes/#development-preview

These docs explain how to use our preview build:

https://docs.photoprism.app/getting-started/updates/#development-preview

@edwinclement08
Copy link
Author

Hey @lastzero, thanks for your quick fix. Updating Caption and Title to the same value resolved the issue.

@lastzero lastzero removed their assignment Jun 2, 2023
@lastzero lastzero added tested Changes have been tested successfully and removed please-test Ready for acceptance test labels Jun 2, 2023
@lastzero
Copy link
Member

lastzero commented Jun 2, 2023

Thank you very much for testing! We will try to release a new stable version with this fix in the next few days. In the meantime, our development preview is generally safe to use, as it does not contain any breaking changes or known issues.

@edwinclement08
Copy link
Author

Thanks a lot😄.

@lastzero lastzero added released Available in the stable release and removed tested Changes have been tested successfully labels Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

2 participants