leantime icon indicating copy to clipboard operation
leantime copied to clipboard

Couple of issues using Leantime

Open JorgeCarousel opened this issue 2 years ago • 10 comments

Discussed in https://github.com/Leantime/leantime/discussions/672

Originally posted by JorgeCarousel April 6, 2022 Hey guys,

I installed Leantime as a test run, but I've been having a couple of issues, how can I fix these?:

  1. I created a couple of users but when I try to edit any of them I get a blank page.
  2. I installed Leantime in a folder called Leantime on my web server so the URL would be something like this: https://server.example.com/Leantime but for some reason in the menu link for To-Dos shows as being: https://server.example.com/Leantime/Leantime/tickets/showKanban (Leantime twice) No other link shows with this second Leantime on it.

Thanks.

JorgeCarousel avatar Apr 06 '22 17:04 JorgeCarousel

Discussed in #672

Originally posted by JorgeCarousel April 6, 2022 Hey guys,

I installed Leantime as a test run, but I've been having a couple of issues, how can I fix these?:

  1. I created a couple of users but when I try to edit any of them I get a blank page.
  2. I installed Leantime in a folder called Leantime on my web server so the URL would be something like this: https://server.example.com/Leantime but for some reason in the menu link for To-Dos shows as being: https://server.example.com/Leantime/Leantime/tickets/showKanban (Leantime twice) No other link shows with this second Leantime on it.

Thanks.

Hi, @JorgeCarousel I answear question number 2

You check file configuration.sample.php in folder config Find line public $appUrl and change your url website

I hope it helpful

minhducsmc avatar Apr 07 '22 07:04 minhducsmc

Hi @JorgeCarousel

See https://github.com/Leantime/leantime/pull/454 for an answer to your question 1)

best regards ron

ronott avatar Apr 07 '22 12:04 ronott

Discussed in #672

Originally posted by JorgeCarousel April 6, 2022 Hey guys, I installed Leantime as a test run, but I've been having a couple of issues, how can I fix these?:

  1. I created a couple of users but when I try to edit any of them I get a blank page.
  2. I installed Leantime in a folder called Leantime on my web server so the URL would be something like this: https://server.example.com/Leantime but for some reason in the menu link for To-Dos shows as being: https://server.example.com/Leantime/Leantime/tickets/showKanban (Leantime twice) No other link shows with this second Leantime on it.

Thanks.

Hi, @JorgeCarousel I answear question number 2

You check file configuration.sample.php in folder config Find line public $appUrl and change your url website

I hope it helpful

I think if I change that all the links in the menu will change and I don't want that, only ToDos is showing Leantime twice, I think it's more related to this from src/domain/general/templates/menu.tpl.php:

<li class="dropdown"> <ul style='display:block'> <li <?php if($module == 'dashboard') echo" class='active' "; ?>> <a href="<?=BASE_URL ?>/dashboard/show"><?=$this->__("menu.dashboard") ?></a> </li> <li <?php if($module == 'tickets' && ($action == 'showKanban' || $action == 'showAll'|| $action == 'showTicket')) echo"class=' active '"; ?>> <a href="<?=$this->get('ticketMenuLink');?>"><?=$this->__("menu.todos") ?></a> </li> <li <?php if($module == 'tickets' && $action == 'roadmap') echo" class='active' "; ?>> <a href="<?=BASE_URL ?>/tickets/roadmap"><?=$this->__("menu.milestones") ?></a> </li> <li <?php if($module == 'timesheets' && $action == 'showAll') echo" class='active' "; ?>> <a href="<?=BASE_URL ?>/timesheets/showAll"><?=$this->__("menu.timesheets") ?></a> </li> <li <?php if($module == 'leancanvas') echo" class='active' "; ?>> <a href="<?=BASE_URL ?>/leancanvas/simpleCanvas"><?=$this->__("menu.research") ?></a> </li> <li <?php if($module == 'ideas') echo" class='active' "; ?>> <a href="<?=BASE_URL ?>/ideas/showBoards"><?=$this->__("menu.ideas") ?></a> </li> <li <?php if($module == 'retrospectives' && ($action == 'showBoards' || $action == 'showBoards')) echo"class=' active '"; ?>> <a href="<?=BASE_URL ?>/retrospectives/showBoards"><?=$this->__("menu.retrospectives") ?></a> </li> <li <?php if($module == 'reports') echo"class=' active '"; ?>> <a href="<?=BASE_URL ?>/reports/show"><?=$this->__("menu.reports") ?></a> </li> <?php if ($login::userIsAtLeast("clientManager")) { ?> <li <?php if($module == 'projects' && $action == 'showProject') echo" class='active' "; ?>> <a href="<?=BASE_URL ?>/projects/showProject/<?=$_SESSION['currentProject']?>"><?=$this->__("menu.project_settings") ?></a> </li> <?php } ?> </ul> </li>

Notice how all the links have a BASE_URL in them except for ToDos, the link for ToDos is created differently than the rest.

JorgeCarousel avatar Apr 07 '22 14:04 JorgeCarousel

image

JorgeCarousel avatar Apr 07 '22 15:04 JorgeCarousel

Hi @JorgeCarousel I don't think reason is it. I using version 2.1.7 Leantime. And i don't problem about url of menu to-do list. image

Below is me config image

minhducsmc avatar Apr 08 '22 01:04 minhducsmc

Weird, I had it as "/Leantime" before and it didn't work, but when http:// is added, it works, thanks.

JorgeCarousel avatar Apr 08 '22 13:04 JorgeCarousel

I must add that relative URLs should work as well as full URLs because if I have the App installed to my computer I access it using http://localhost/Leantime and if I want to give access to somebody else, they will have to access using either http://computername/Leantime or http://12.34.56.78/Leantime and the menu will have a static URL that if it was localhost, it won't work for any of the other users and if the computer is in a DHCP the IP will change too, so in this case relative is better.

JorgeCarousel avatar Apr 08 '22 14:04 JorgeCarousel

Regarding issue 1 above, I was seeing blank pages any time I submitted a new task. The logs showed the following error:

PHP Fatal error: Uncaught PHPMailer\PHPMailer\Exception: Invalid address: (From): in /var/www/leantime/vendor/phpmailer/phpmailer/src/PHPMailer.php:1300

Setting the $email variable in config/configuration.php fixed that. If your Leantime installation isn't actually sending email, you can put in a fake address like this:

public $email = "[email protected]"; //Return email address

diamondap avatar Apr 27 '22 12:04 diamondap

Regarding to the second question I have changed in /public/index.php line 16:

from define('CURRENT_URL', $config->appUrl.$settings->getRequestURI($config->appUrl)); to define('CURRENT_URL', $settings->getRequestURI($config->appUrl));

And now everything works fine. Is this a bug only visible at installation in a subdir?

DerSaxxe avatar Jul 17 '22 12:07 DerSaxxe

Thanks! The sub folder installation is still causing some issues that I haven’t been able to fully reproduce yet. I am glad you solution works in that case, but I believe it causes issues for regular installs. I am rethinking the entire redirect flow and hope to solve that soon.

marcelfolaron avatar Jul 17 '22 14:07 marcelfolaron