Dead links problem, after upgrading PrimeFaces 7 to 8

Forum rules
Please note that response time for technical support is within 3-5 business days.
hasantolak
Posts: 16
Joined: 05 Dec 2018, 16:38

08 Apr 2020, 10:22

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

hasantolak
Posts: 16
Joined: 05 Dec 2018, 16:38

08 Apr 2020, 15:10

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

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

20 Apr 2020, 06:55

Hi,

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

Best Regards,

hasantolak
Posts: 16
Joined: 05 Dec 2018, 16:38

22 Apr 2020, 09:51

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

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

23 Apr 2020, 04:02

Interesting! I still couldn't replicate it. Could you please try it with our sample project? Also, do you get an error on console?

hasantolak
Posts: 16
Joined: 05 Dec 2018, 16:38

23 Apr 2020, 17:55

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

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

16 Jun 2020, 13:43

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,

hasantolak
Posts: 16
Joined: 05 Dec 2018, 16:38

17 Jun 2020, 13:05

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

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

24 Jun 2020, 08:57

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,

hasantolak
Posts: 16
Joined: 05 Dec 2018, 16:38

24 Jun 2020, 22:07

Hi,
Thank you very much aragorn.
Now it works as expected.

Regards
Hasan

Post Reply

Return to “Barcelona - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests