The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Page title not displayed correctly - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: Page title not displayed correctly (/showthread.php?tid=961)

Pages: 1 2 3


Page title not displayed correctly - akakor - 02-19-2018

Hi,

I recently started tinkering with UserSpice. I created a page, faq.php, in the root. I added a page name in the Page Manager, but only the sitename is displayed in the <title></title> tag. How can I fix that?

I also noticed that if I change header.php in /usersc, it's not being used. The header.php from /users is used. How can I force that, or is that a bug?

Thanks.
Aka


Page title not displayed correctly - mudmin - 02-19-2018

You don't think there is a chance that you have 2 pages with the same name and you could be editing the wrong one in the page manager, right? I only ask because that's what I did and I was pretty confused as to why it wasn't working. I just did this test
http://puu.sh/zr5EZ/727dd4f3d5.png
and it worked for me. If you're definitely editing the right page, it sounds like a server configuration issue. Do the other page titles work? What version of userspice are you on? Is it a fresh install or did you upgrade from an earlier version.

Regarding the header, we don't have a usersc header option to replace the whole header, but there are ways to do whatever you want to accomplish. Are you just wanting to add some code to the header? If so, do that in usersc/includes/head_tags.php If you want to replace the header itself, let me know.


Page title not displayed correctly - Brandin - 02-19-2018

It's also possible you are using Database-Driven Navigation and this isn't overwritten by usersc, you will need to handle this from admin_menus.php.


Page title not displayed correctly - akakor - 02-19-2018

Thanks for the quick replies! I'm using the latest updated 4.3.

I just made a new page from a blank template and used Page Management to set it to public and enter a title. But the title isn't being used.

Screenshot of the setting in Page Management: https://snag.gy/gXhziE.jpg

And the live test page: http://u11636p12168.web0111.zxcs.nl/cookie-policy.php

Any ideas? Don't forget I'm a UserSpice noob (but I know my way in php/html).
Thanks!


Page title not displayed correctly - Brandin - 02-19-2018

Hmm - that's bizarre. The title is set on Line 139 of header.php. It is:
Code:
<title><?= (($pageTitle != '') ? $pageTitle : ''); ?> <?=$settings->site_name?></title>

Can you double check to make sure your title tag looks like that?

B.


Page title not displayed correctly - akakor - 02-19-2018

Yes, I can confirm that. LIne 139 of /users/includes/header.php:

Code:
<title><?= (($pageTitle != '') ? $pageTitle : ''); ?> <?=$settings->site_name?></title>

It's a fresh install btw.


Page title not displayed correctly - Brandin - 02-19-2018

Can you run this query on your DB and screen the output:
SELECT * FROM pages WHERE page LIKE {3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}cookie.php{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}

(surround the like with single quotes-it wont let me post it like that)


Page title not displayed correctly - shoropio - 02-20-2018

It happens on all my pages that are at the root of my site. The closest thing to a solution I found was adding z_us_root.php /. it works just that it saves two copies of my pages in the database. Example: index.php and /index.php
My z_us_root.php


Page title not displayed correctly - shoropio - 02-20-2018

Just edit for example. cookie-policy.php/ not the cookie-policy.php


Page title not displayed correctly - Brandin - 02-20-2018

Ahh yes, the devious root level files! I didn't even realize that...root level files are not covered by z_us_root on fresh install, you would have to, as Shorpio suggested, add '/' to your z_us_root so the files are in the DB.

Brandin.