Common overall_footer.html js questions help

User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Common overall_footer.html js questions help

Post by axew3 »

Template integration issue:

JS error when on reply/post/review and (for example) the preview button is clicked, the console on subsequent loaded page return error:

Code: Select all

Uncaught TypeError: $(...).offset() is undefined
The error above mentioned has been fixed, changing this line into the overall_footer.html js code (that will be now immediately updated/fixed on the help procedure page):

Code: Select all

  if( location.hash.length < 2 ){
change into:

Code: Select all

  if( ! $(window.location.hash).length || location.hash.length < 2 ){
recompile phpBB stale template so to let edits be applied.

It is an !important fix.
User avatar
Ezrael
w3 User
w3 User
Posts: 102
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: pre - 2.8.9 logs

Post by Ezrael »

I did the change and will test it now
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: pre - 2.8.9 logs

Post by axew3 »

Hello, i experimented yesterday a new page-forum.php, that i will propose so to test it (i will put example online) and to see, whenever someone else will read the topic, how it could be improved or if except the one i did, there is another way to achieve the same, or better result.

My page forum "experiment" return this:
the Url into the wp parent page is not pushed anymore, except when it will load the first time.
Then you can start navigate and go forward or backward with the browser history, the effect is much better than the version with base64 urls.
At the time the user go to reload the wp page, it will correctly return to the same post or topic etc.
But once the reload has been executed, then the browser's tab history is not navigable anymore and it will be impossible to, for example, back forward with the browser to visit old pages.

After last applied fix into the overall_footer code, about the jQuery error, i did not experienced any "resizing 1px or selected elements like when on console active": no problem at moment. But maybe it was not related, we'll see.

Code: Select all

  if( location.hash.length < 2 ){
change into:

Code: Select all

  if( ! $(window.location.hash).length || location.hash.length < 2 ){
User avatar
Ezrael
w3 User
w3 User
Posts: 102
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: pre - 2.8.9 logs

Post by Ezrael »

I haven't experienced the issue since I change the code yesterday and I did a lot of edits.

But is found another issue in my forum. If I use the edit function which shows the preview of the post and after it the editor, while using BB-Code URL as example, the Popup appears in the middle of the frame but should popup at the bottom.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: pre - 2.8.9 logs

Post by axew3 »

i did not understand the issue, can you exaplain step by step what i should do to reproduce?
Because if i use the bb code url button, it normally do not show-up a popup: do you mean using lightbox, so in preview, you go to click and open the added image?

- The page forum "experiment" seem to work good: i would like that if an user refresh the browser in edit mode, the post content should not be lost... let see if also this aspect can be fixed, would be really cool!
User avatar
Ezrael
w3 User
w3 User
Posts: 102
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: pre - 2.8.9 logs

Post by Ezrael »

All popup messages are not shown at the right place. Your Test-user in my board is still active. Just Subscribe or Unsubscribe a Topic und you will see the issue.

Thats happening to all of these alert messages.
Attachments
Screenshot 2024-07-13 at 21.38.28.png
Screenshot 2024-07-13 at 21.38.28.png (20.99 KiB) Viewed 611 times
Post Reply