Read before updating: How to Update Kunena Templates - More detail

error in default php

H Topic Author
Senior Member Senior Member
Han's Avatar
Han
  • Posts: 65
  • Thanks: 1

error in default php

1 year 3 months ago
#16850
I have checked the Joomla 4 error reporting and get an error 
Undefined variable $target in /home/public/sites/www.aldfaerforum.nl/components/com_kunena/template/nts_kbee/layouts/bbcode/url/default.php on line 32
I have attached the zipped file. What should it be?

File Attachment:

File Name: default.zip
File Size:1 KB

Please Log in or Create an account to join the conversation.

P
Junior Member Junior Member
  • Posts: 23
  • Thanks: 2

Re: error in default php

1 year 3 months ago
#16851
Make an override of the file and change lines 20-22 to this:
Code:
// Display URL $rel = ''; $target = '';

Please Log in or Create an account to join the conversation.

H Topic Author
Senior Member Senior Member
Han's Avatar
Han
  • Posts: 65
  • Thanks: 1

Re: error in default php

1 year 3 months ago
#16852
How do you make an override for NTS Kbee? Can not find it in the documentation.

Please Log in or Create an account to join the conversation.

P
Junior Member Junior Member
  • Posts: 23
  • Thanks: 2

Re: error in default php

1 year 3 months ago
#16853
Like you  make a override for any other extension. In your Joomla template folder you have a subfolder html. If not exists create a folder com_kunena. In this folder create a folder layouts. In layouts create a folder bbcode, in this folder create a folder url. Place your changed default.php in the folder url.

So in fact it's almost the same structure as in your KBee folder
Code:
components/com_kunena/template/nts_kbee/layouts/bbcode/url
becomes for your override:
Code:
your_template/com_kunena/layouts/bbcode/url/default.php

Please Log in or Create an account to join the conversation.

H Topic Author
Senior Member Senior Member
Han's Avatar
Han
  • Posts: 65
  • Thanks: 1

Re: error in default php

1 year 3 months ago
#16858
I have made the complete path by FTP, which I found easier to do. The changed default is now causing another error in the Joomla error listing
Undefined variable $end_tag_params in /home/public/sites/www.aldfaerforum.nl/libraries/kunena/External/Nbbc/src/BBCode.php on line 2321

 

Please Log in or Create an account to join the conversation.

P
Junior Member Junior Member
  • Posts: 23
  • Thanks: 2

Re: error in default php

1 year 3 months ago
#16859
Are you sure you have the correct path for your override? Is there a mistake in the syntax of default.php?

Please Log in or Create an account to join the conversation.

H Topic Author
Senior Member Senior Member
Han's Avatar
Han
  • Posts: 65
  • Thanks: 1

Re: error in default php

1 year 3 months ago
#16860
The override you gave stopped the error message which occurred frequently. So path etc must be correct. The override is attached.

 

File Attachment:

File Name: default_20...2-01.zip
File Size:1 KB

Please Log in or Create an account to join the conversation.

P
Junior Member Junior Member
  • Posts: 23
  • Thanks: 2

Re: error in default php

1 year 3 months ago
#16861
OK. This template is even crappier than I thought.
Solution:
replace
Code:
// Display URL $rel = ''; $target = ''; } else {     $rel = ''; } ?>
with
Code:
// Display URL. $rel = ''; $target = ''; if (!$this->internal) {     $rel = 'rel="nofollow noopener noreferrer"';     $target = ' target="' . $this->escape($this->target) . '"'; } ?>
Really nice that developers haven't checked this forum for weeks

Please Log in or Create an account to join the conversation.

ntstore's Avatar
Administrator Administrator
  • Posts: 1213
  • Thanks: 240

Re: error in default php

1 year 3 months ago
#16871
Hi Han,
We updated new code to the download package. You can download the template and update to your website.

Kind regards,
Hung Pham
Email: 9themestore@gmail.com
Twitter: @9themestore

Please Log in or Create an account to join the conversation.

H Topic Author
Senior Member Senior Member
Han's Avatar
Han
  • Posts: 65
  • Thanks: 1

Re: error in default php

1 year 3 months ago
#16874
I have not seen the error in my error list for the last 4 hours. So I think this is the correct code. Thank you Pinkeltje.

Please Log in or Create an account to join the conversation.

Time to create page: 0.399 seconds