Forum

Thread tagged as: Question, Problem, Error

Region Options message indicating template error

Any suggestions where to look to debug an issue when this kind of message appears under Region Options.


Template Notice: Undefined index: label in ..../perch/core/apps/content/modes/region.options.post.php on line 263 Notice: Undefined index: path in .../perch/core/apps/content/modes/region.options.post.php on line 263
  • The full path on file => is my local computer path so I replaced it with a ...

I've been trying to figure out what I did to cause it, for a couple of days now, so looking for a hint where I might look.

The front end page regions display correctly, and the back end regions data entry screens work properly. The only time I get the error is when I visit region options on any page's regions. I believe I introduced the problem as it is isolated on one branch used for template development where either we introduced a naming conflict or a variance in number of fields in category or content template.

DIAGNOSTICS:
SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r
WHERE u.roleID=r.roleID AND u.userEnabled='1' AND u.userID=1 AND u.userHash='5482819572f7fd42e920e4e314b34e7d'
LIMIT 1
UPDATE perch2_users SET userHash='0e3e79904743642047400674a783f1f0' WHERE userID=1
SELECT p.privKey FROM perch2_user_privileges p
SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID
SELECT * FROM perch2_content_regions WHERE regionID=714 LIMIT 1
SELECT * 
FROM perch2_user_roles ORDER BY roleTitle ASC
Using template: /templates/content/interactive/slider.html
Setting alert: Changing the template can result in data loss if the fields in the templates are not the same. (notice)
Queries: 7
Array

(

    [type] => 8

    [message] => Undefined index: path

    [file] => .../perch/core/apps/content/modes/region.options.post.php

    [line] => 263

)

  • The full path on file => is my local computer path so I replaced it with a ...
Scott Gruber

Scott Gruber 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the notice prevent you from proceeding?

I can proceed. Everything works ok. Only issue is the message appearing in Region Options.

I am unsure how the error was introduced that caused the message to appear. Would like to figure it out before merging that branch until I sort it out. Debug fun.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does saving the form not fix it?

Unfortunately, no. Maybe, I'm not saving the suspect template form. I'm still poking around.

Could I have corrupted something in the database?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll look into possible causes.

Strike that. It couldn't be the database. If I switch branches error disappears. If I import old backup database error is still isolated in one branch.

It looks like something on my end. Don't want to distract you from more urgent work. Will follow up with post if I track it down.

We found the cause of the error. We observed that perch/templates/content can only have one level of subdirectories, but we had a directory nested two levels down, as perch/templates/content/foo/bar. Moving the template files up into perch/templates/content/foo and removing the bar directory solved the problem.