This Help forum is for issues relates to the latest release (1.0). For issues related to beta or svn version please use their own Help forum.
When requesting help please provide as much information as possible. Explain what version of webtrees, PHP and MYSQL you are using. If possible provide a URL to your site so we can see the problem first-hand.
Tip: Think about putting these details in your signature, so it appears in the footer of ALL your messages

TOPIC: "ERROR 2" on My Page

"ERROR 2" on My Page 8 years 10 months ago #1

  • alroe
  • alroe's Avatar
Hi, we just installed webtrees version 1.06 and it seems to work ok. There is an error on My Page, however, below the two boxes "On This Day ... " and "No events exist for today" (see below). Any ideas on what may be the problem?
Hugo

ERROR 2: require(templates/personbox_template.php) [function.require]: failed to open stream: No such file or directory
0 Error occurred on line 361 of file functions_print.php in function print_pedigree_person
1 called from line 361 of file functions_print.php in function print_pedigree_person
2 called from line 206 of file module.php in function getBlock
3 called from line 135 of file index.php

Warning: require(templates/personbox_template.php) [function.require]: failed to open stream: No such file or directory in /home/xxxxxx/aner/includes/functions/functions_print.php on line 361

ERROR 2: require(templates/personbox_template.php) [function.require]: failed to open stream: No such file or directory
0 Error occurred on line 361 of file functions_print.php in function print_pedigree_person
1 called from line 361 of file functions_print.php in function print_pedigree_person
2 called from line 206 of file module.php in function getBlock
3 called from line 135 of file index.php

Warning: require(templates/personbox_template.php) [function.require]: failed to open stream: No such file or directory in /home/xxxxxx/aner/includes/functions/functions_print.php on line 361

Fatal error: require() [function.require]: Failed opening required 'templates/personbox_template.php' (include_path='/home/xxxxxx/aner/library:.:/usr/local/lib/php') in /home/xxxxxx/aner/includes/functions/functions_print.php on line 361
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 10 months ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11536
The error would appear to be from a "User favourites" block.

Do you have this block? Do you have any favourites listed within it?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 10 months ago #3

  • alroe
  • alroe's Avatar
Yes, we have the User Favourites block on My page (I dont know where to configure this, though). And yes, I have a user favourite, I can see this in the link to Favourites in the Menu.
I looked at another user who did not yet have a user favourite, and here the box was shown on My page and no error. However, when I chose a favourite for that user, the error came on that page as well.
On the front page, the database favourite is shown without errors.
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 10 months ago #4

  • ToyGuy
  • ToyGuy's Avatar
  • Offline
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
  • Posts: 4925
Hugo
You may not be aware that there is a difference between Favourites selected by the admin for site wide application, and personal favourites. You configure the personal favourites using the personal block on your My Page (block title is My Favourites) and add to it using the configuration link at the bottom of the block, "Add a new favourite". The site favourites block is similar, but located on the Home Page and configured there in the same fashion. Site-wide Home Page favourites should appear on every user and casual visitor's pages while personal (My) favorites will appear only on a single person's pages. If existing for that user, they will both appear in the menu at the top, and then separately on the Home and My Page page blocks.

The code may be confused if the block is present on your 'My Page', but have no favourite specified. This should not be the case as selection is not mandatory, but could be, and identifying this would be helpful as a clue to the error.
Thanks,
Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com, a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 10 months ago #5

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11536
At first glance, it would appear that the theme is undefined. Does this affect all themes. Do you have a custom theme?

This *could* be a coding error (FYI, the relevant code has been updated since 1.0.6), however, I cannot reproduce this error in either 1.0.6 nor the latest code.

Fixing errors that you cannot reproduce is very difficult.

Without more information, I can only suggest waiting until the next release (middle of January?)
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 10 months ago #6

  • alroe
  • alroe's Avatar
Yes, the error looks the same in all themes, and we don't use a custom theme. I don't know what might cause the error on our site and not on other sites, but I understand that you cannot do more. It is only a minor error, so I will wait and see whether the update removes the error. Thanks for looking into it.
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 10 months ago #7

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum
  • Posts: 4965
While you wait (and I wouldn't be at all confident any code change will fix this, as all other sites seem to work OK), have you checked that the files referred to in the error do exist?
ERROR 2: require(templates/personbox_template.php) [function.require]: failed to open stream: No such file or directory

There should be this structure within each theme folder, such as /themes/webtrees/templates/personbox_template.php. In fact there should be three files in each "templates" folder.
Nigel

www.our-families.info

Hosted at:
Follow me at:
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 8 months ago #8

  • daj
  • daj's Avatar
I think there is more to this than you may think. I know this is a old post but I was searching as I now have the same problem.

Everything was working fine for a user on my test system and then I customized the front page and added user Favourites and (I think) 'up and coming events'.

I now get the same error
ERROR 2: require(templates/personbox_template.php): failed to open stream: No such file or directory
If you think about this a little more you will see that the Theme directory has not been tagged onto the require statement -- one would expect 'theme/<themename>/' to preceded the filename ?

The next line of the error tells me that the 'require' statement in on line 361 of functions_print.php. I looked at the line and see $THEME_DIR should be prepended. A quick hack of the script to print the variable shows me that $THEME_DIR is blank :-o

If I change the variable to WT_THEME_DIR it solves the problem and the script moves on, but errors again with a similar problem. It would appear that $THEME_DIR is being cleared somewhere --Yes/No?
Last Edit: 8 years 8 months ago by daj.
The administrator has disabled public write access.
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: 

Re: "ERROR 2" on My Page 8 years 8 months ago #9

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum
  • Posts: 4965
As we are only hours away from releasing ver 1.1.0, I would recommend you wait briefly then try that version, as per this comment:
This *could* be a coding error (FYI, the relevant code has been updated since 1.0.6), however, I cannot reproduce this error in either 1.0.6 nor the latest code.

Fixing errors that you cannot reproduce is very difficult.

Without more information, I can only suggest waiting until the next release (middle of January?)
Sorry the release is later than "middle of January", but it WILL be out in a few hours.
Nigel

www.our-families.info

Hosted at:
Follow me at:
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 8 months ago #10

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11536
Hi David,

Your investigation and diagnosis are correct. $THEME_DIR has been replaced with WT_THEME_DIR.

From the line-number, I'm guessing you are using webtrees 1.0.6

This bug has already been fixed, and the 1.1.0 release (tomorrow?) will include it.

Greg
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 8 months ago #11

  • daj
  • daj's Avatar
Thanks Nigel.

I will look forward to the update, and I can report back.

I did hear one was coming soon so I am waiting with some anticipation as there are several things I hope will get fixed but I have held off on reporting them. I have been busy themeing while I waited on an update, but this particular problem has floored me as I do not know how to fix the problem for that user now (so they can not login). It's a test system at the moment anyway so not a biggie
The administrator has disabled public write access.

Re: "ERROR 2" on My Page 8 years 8 months ago #12

  • daj
  • daj's Avatar
Greg, thanks
fisharebest wrote:
Hi David,
Your investigation and diagnosis are correct. $THEME_DIR has been replaced with WT_THEME_DIR.

From the line-number, I'm guessing you are using webtrees 1.0.6
Yes, I'm on 1.0.6
This bug has already been fixed, and the 1.1.0 release (tomorrow?) will include it.
i'm excited :-)
The administrator has disabled public write access.
Powered by Kunena Forum