Forum Support

Shape 5
March 28, 2024, 02:08:35 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Undefined variable: suffix_expand5  (Read 2252 times)
rhart
Jr. Member
**
Offline Offline

Posts: 7



« on: September 26, 2017, 01:19:52 AM »

Hi,

my logs on the server are quickly filling up with the following errors:

PHP message: PHP Notice:  Undefined variable: suffix_expand5 in /home/..../domains/..../public_html/portal/templates/design_control/vertex/position_layouts.php on line 247

(replaced my domain with dots in above)

Any idea how this can be solved ?

Thanks!
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #1 on: September 26, 2017, 03:04:03 PM »

Hello,

Do you have a module with with extra spaces in the module class suffix?
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
rhart
Jr. Member
**
Offline Offline

Posts: 7



« Reply #2 on: September 28, 2017, 12:31:03 PM »

Hello,

Do you have a module with with extra spaces in the module class suffix?

Not that I'm aware off, is there a quick way to check for extra spaces ?

Actually when doing some further research it looks like it is caused by the -inset suffix. I've 3 modules on my homepage with this suffix and did get the error 3 times with every page visit. When removing the -inset from one of the modules only 2 errors are left.
« Last Edit: September 28, 2017, 12:42:42 PM by rhart » Logged
rhart
Jr. Member
**
Offline Offline

Posts: 7



« Reply #3 on: October 11, 2017, 05:44:00 AM »

Hi,

anyone has any idea ?

Why is the -inset causing the PHP message: PHP Notice:  Undefined variable: suffix_expand5 in /home/..../domains/..../public_html/portal/templates/design_control/vertex/position_layouts.php on line 247 ?
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #4 on: October 11, 2017, 08:17:38 AM »

Hello,

I am not able to replicate this problem on any site that I am running, and I have full error reporting on with an -inset module present. Are you sure you are running Vertex 4.2?

I have also reviewed that file and I don't see any problems with it. The variable is defined at line 181:

$suffix_expand5 = $suffix_expand[5];

Also, that entire area of code will only run if you have a space in your module class. Make sure you have the module set as "-inset" with no space before or after:

if(strrpos($suffix," ") > 1) {

Finally this is just a warning message, it is not something that will effect the functionality of the site. You can turn off these messages in the Joomla global configuration under Server/Error Reporting - Set to "none".
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
rhart
Jr. Member
**
Offline Offline

Posts: 7



« Reply #5 on: October 11, 2017, 08:32:22 AM »

Hi,

Yes, I'm running Vertex 4.2

There is no space in the module class for or after.

Actually looking further at the code, $suffix_expand5 only seems to be defined when there is an space as it comes after line 174:  if(strrpos($suffix," ") > 1) {

but this if is closed on line 247 and goes into an else if

} else if (strlen($suffix) == 6 && strrpos($suffix,"-") == 0 && ctype_xdigit($suffix_expand5)) {
         $suffix_color = $suffix;
         $suffix = "";
      }

and here it goes wrong and the  $suffix_expand5 is not defined due to else if and this code is run when there is no space

So just guessing here that the } on line 247 is placed wrong and probably should be around line 251 after above code part ??
« Last Edit: October 11, 2017, 08:34:45 AM by rhart » Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #6 on: October 11, 2017, 08:48:38 AM »

Hello,

Ah, yes the bracket is just in the wrong location. Try the attached one.
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
rhart
Jr. Member
**
Offline Offline

Posts: 7



« Reply #7 on: October 11, 2017, 08:58:32 AM »

Yep, that solved it  Cool
Logged
winstart
Jr. Member
**
Offline Offline

Posts: 78



« Reply #8 on: October 13, 2017, 07:36:05 AM »

download is not correct, this is the file that i download
its not the position_layout.php. Tried it several times
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #9 on: October 13, 2017, 11:58:46 AM »

Hello,

That file was just created the other day, it is correct and will fix the undefined error. If you're still having a problem please post a url.
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Strozier95
Jr. Member
**
Offline Offline

Posts: 1



« Reply #10 on: July 09, 2018, 12:06:54 AM »

How to fix undefined variable/index notice
Why does this happen?
How to fix "Undefined variable"?
How to fix "Undefined index"?
Output
Null coalescing operator
Logged
mikek
Administrator
*****
Offline Offline

Posts: 28743



WWW
« Reply #11 on: July 09, 2018, 05:10:47 AM »

Hello,

Make sure you are running the latest version of Vertex. Please also provide the exact error message you are seeing.
Logged

Mike Knott
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.