Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4253
Latest: Ineedsmfhelp
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43242
Total Topics: 7516
Most Online Today: 126
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 101
Total: 102

Author Topic: Pretty URLs and 2.1  (Read 4204 times)

0 Members and 1 Guest are viewing this topic.

Offline Oldiesmann

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 20
    • View Profile
    • Archie Comics Fan Forum
Pretty URLs and 2.1
« on: February 18, 2019, 07:01:54 pm »
On my forum, when I enable URL rewriting, the form in the login popup never loads, even if I disable rewriting of the login action.

I get this error in the console in Chrome:

Code: [Select]
script.js:1016 Uncaught TypeError: Cannot use 'in' operator to search for 'addEventListener' in undefined
    at createEventListener (script.js:1016)
    at (index):402
createEventListener @ script.js:1016
(anonymous) @ (index):402

Apparently something is calling createEventListener without specifying an object. I haven't had time to dig into this further though.

Offline Oldiesmann

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 20
    • View Profile
    • Archie Comics Fan Forum
Re: Pretty URLs and 2.1
« Reply #1 on: February 18, 2019, 07:06:50 pm »
I should note that this still happens even when using the most recent version of the mod.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Pretty URLs and 2.1
« Reply #2 on: February 18, 2019, 07:52:58 pm »
From what I find on my test site it strips out the ; for this statement  which is strange.
So i added this code in the filter section to place it back... but that is a band aid.
Code: [Select]
$buffer = str_replace('javascript:self.close()"','javascript:self.close();"',$buffer);

I am still trying to narrow it down..
« Last Edit: February 18, 2019, 07:55:55 pm by SMFHacks »
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Oldiesmann

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 20
    • View Profile
    • Archie Comics Fan Forum
Re: Pretty URLs and 2.1
« Reply #3 on: February 18, 2019, 08:24:33 pm »
What file do I add that in?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Pretty URLs and 2.1
« Reply #4 on: February 18, 2019, 08:44:40 pm »
I had it in Pretty-Urls-Filter.php

After
Code: [Select]
// Put the URLs back into the buffer
$context['pretty']['replace_patterns'][] = '~(<a[^>]+href=|<link[^>]+href=|<form[^>]+?action=)(\"[^\"]+\"|\'[^\']+\')~';
foreach ($context['pretty']['replace_patterns'] as $pattern)
$buffer = preg_replace_callback($pattern, 'pretty_buffer_callback', $buffer);
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Oldiesmann

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 20
    • View Profile
    • Archie Comics Fan Forum
Re: Pretty URLs and 2.1
« Reply #5 on: February 18, 2019, 09:39:38 pm »
That fixed it. Thanks!

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Pretty URLs and 2.1
« Reply #6 on: February 18, 2019, 09:40:57 pm »
It's very strange for two reasons one that the ; gets stripped out to.
And second that the ; makes a difference!
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Pretty URLs and 2.1
« Reply #7 on: March 07, 2019, 11:23:09 pm »
I think also fixed email notifications issue for 2.1
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
6349 Views
Last post September 11, 2010, 06:21:10 am
by Wickedgood
4 Replies
6057 Views
Last post December 13, 2010, 07:05:12 pm
by SMFHacks
12 Replies
8900 Views
Last post April 07, 2012, 08:25:21 am
by SMFHacks
2 Replies
9144 Views
Last post June 21, 2012, 08:16:38 am
by mjindustry
30 Replies
9718 Views
Last post April 10, 2019, 01:17:37 pm
by SMFHacks

+- Recent Topics

is it possible to add support for odysee.com by SMFHacks
March 13, 2024, 10:53:28 pm

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

User Gallery Feature: move / bulk move images by SMFHacks
January 30, 2024, 05:48:25 pm

In the future it may be for smf 2.1.x? by smithloo
January 30, 2024, 12:55:34 am

Powered by EzPortal