error in default php

  • Han
  • Han's Avatar Offline Topic Author
  • Senior Member
  • Senior Member
  • Thanks: 1
  • Posts: 64

error in default php was created by Han

Posted 7 months 1 week 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
Post by Han

Attachments:

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

Replied by Pinkeltje on topic error in default php

Posted 7 months 1 week ago #16851
Make an override of the file and change lines 20-22 to this:
Code:
// Display URL $rel = ''; $target = '';
Post by Pinkeltje

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

  • Han
  • Han's Avatar Offline Topic Author
  • Senior Member
  • Senior Member
  • Thanks: 1
  • Posts: 64

Replied by Han on topic error in default php

Posted 7 months 1 week ago #16852
How do you make an override for NTS Kbee? Can not find it in the documentation.
Post by Han

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

Replied by Pinkeltje on topic error in default php

Posted 7 months 1 week 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
Post by Pinkeltje

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

  • Han
  • Han's Avatar Offline Topic Author
  • Senior Member
  • Senior Member
  • Thanks: 1
  • Posts: 64

Replied by Han on topic error in default php

Posted 7 months 1 week 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

 
Post by Han

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

Replied by Pinkeltje on topic error in default php

Posted 7 months 1 week ago #16859
Are you sure you have the correct path for your override? Is there a mistake in the syntax of default.php?
Post by Pinkeltje

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

  • Han
  • Han's Avatar Offline Topic Author
  • Senior Member
  • Senior Member
  • Thanks: 1
  • Posts: 64

Replied by Han on topic error in default php

Posted 7 months 1 week 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
Post by Han

Attachments:

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

Replied by Pinkeltje on topic error in default php

Posted 7 months 1 week 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
Post by Pinkeltje

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

Replied by ntstore on topic error in default php

Posted 7 months 1 week 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

Post by ntstore

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

  • Han
  • Han's Avatar Offline Topic Author
  • Senior Member
  • Senior Member
  • Thanks: 1
  • Posts: 64

Replied by Han on topic error in default php

Posted 7 months 1 week 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.
Post by Han

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

Time to create page: 0.682 seconds