Page 1 of 2

Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 08 Apr 2020, 10:22
by hasantolak
Hello,
I have a JSF application with Barcelona layout.

After upgrading Prime Faces 7 to 8.
Side menu links does not load the page, and append the # at the end of the url.
Reading the information, I changed the line, you suggested in layout.js,

from

Code: Select all

this.menulinks.off('click).on('click, function(e) {
to

Code: Select all

this.menulinks.off('click.menuitem').on('click.menuitem', function(e) {
But after that, when the page loading from address bar or refresh the page from the browser, dead link problem happened.
Thanks for your suggestions.

Regards

Hasan

Re: Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 08 Apr 2020, 15:10
by hasantolak
Hello,
I did some experience about the situation.
When I remove the MOVE_SCRIPTS_TO_BOTTOM parameter

Code: Select all

 
<context-param>
    <param-name>primefaces.MOVE_SCRIPTS_TO_BOTTOM</param-name>
    <param-value>true</param-value>
</context-param>
While I keep CSP parameter

Code: Select all

 
<context-param>
    <param-name>primefaces.CSP</param-name>
    <param-value>true</param-value>
</context-param>
The problem has disappeared.

Regards

Hasan

Re: Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 20 Apr 2020, 06:55
by mert.sincan
Hi,

I'll release the next version this weekday with 8.0 support.

Best Regards,

Re: Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 22 Apr 2020, 09:51
by hasantolak
Hi,

Thanks for new release of Barcelona layout.

When the MOVE_SCRIPTS_TO_BOTTOM parameter is true, the problem is still exist.
It seem that problem is MOVE_SCRIPTS_TO_BOTTOM specific.
But, I am not sure, this is a general problem or just from Barcelona layout.

Regards
Hasan

Re: Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 23 Apr 2020, 04:02
by mert.sincan
Interesting! I still couldn't replicate it. Could you please try it with our sample project? Also, do you get an error on console?

Re: Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 23 Apr 2020, 17:55
by hasantolak
Hello,

I figure out the problem.
Barcelona Layout is working very well.

The problem is actually related my previous topic.
https://forum.primefaces.org/viewtopic ... 3&t=57896


Because, We tried to merge new layout js with your suggestion in the above topic.

Unfortunately, the problem was happened when merging new layout.js with your suggestion.

Therefore, when we use the new layout..js, it working fine but, the problem happen related with the above topic again.

I hope the problem is clear enough.

Regards

Hasan

Re: Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 16 Jun 2020, 13:43
by mert.sincan
Thanks a lot for the update! But, I still couldn't replicate it. Maybe, you can check item's href value in console. Exp;

Code: Select all

<li id="menu-form:bm_sample" role="menuitem" class="active-menuitem">
      <a class="ripplelink" href="/barcelona/sample.xhtml"> /* Please check it. I think your menuitems has # in this line. Maybe, the url may not be included here.
            <i class="material-icons"></i>
            <span>Sample Page</span>
      </a>
</li>
Best Regards,

Re: Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 17 Jun 2020, 13:05
by hasantolak
Hello,

Thanks for your answer to the question.

Firstly I have to say that the new version Barcelona layout working well.

The problem is happening in our application about topbar menu when wrap by a form.
Somehow we need to wrap topbar to refresh the menu

Easley, you can make an experience the problem when wrapping

Code: Select all

 
 <div class="topbar">. 
 
By a form

Code: Select all

 
<h:form/>
 
Except profile-item, the other menues does not popup any more.

Regards

Hasan

Re: Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 24 Jun 2020, 08:57
by mert.sincan
Thanks a lot for the info. Please make the following change in layout.js;

Code: Select all

PrimeFaces.widget.Barcelona = PrimeFaces.widget.BaseWidget.extend({
    
    init: function(cfg) {
         ...
        // this.topbar = this.wrapper.children('.topbar'); 
	this.topbar = this.wrapper.find('.topbar'); // Please use this selector
	...
     }
...
Best Regards,

Re: Dead links problem, after upgrading PrimeFaces 7 to 8

Posted: 24 Jun 2020, 22:07
by hasantolak
Hi,
Thank you very much aragorn.
Now it works as expected.

Regards
Hasan