Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12333
Latest: crlynmpys01
New This Month: 20
New This Week: 10
New Today: 1
Stats
Total Posts: 39721
Total Topics: 6996
Most Online Today: 129
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 37
Total: 37

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

0 Members and 1 Guest are viewing this topic.

Offline Oldiesmann

  • SMF Gallery Pro Customer
  • Newbie
  • *****
  • Posts: 14
    • 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
  • Newbie
  • *****
  • Posts: 14
    • 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: 14878
    • 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
  • Newbie
  • *****
  • Posts: 14
    • 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: 14878
    • 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
  • Newbie
  • *****
  • Posts: 14
    • 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: 14878
    • 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: 14878
    • 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
2 Replies
6610 Views
Last post June 21, 2012, 08:16:38 am
by mjindustry
0 Replies
692 Views
Last post February 10, 2018, 05:52:48 am
by juliereader
6 Replies
2250 Views
Last post July 15, 2018, 04:14:19 pm
by SMFHacks
5 Replies
604 Views
Last post April 18, 2019, 10:50:05 pm
by Oldiesmann
30 Replies
1187 Views
Last post April 10, 2019, 01:17:37 pm
by SMFHacks

+- Recent Topics

About Terms of Use feature by ajac63
May 23, 2019, 06:09:06 pm

About Layout Options by ajac63
May 23, 2019, 04:14:49 am

Error message in Gallery Pro by SMFHacks
May 21, 2019, 03:56:20 pm

Category images not showing by ajac63
May 21, 2019, 03:00:33 pm

Which Options To Disable If I Don't Want Auction Listings by ajac63
May 19, 2019, 11:03:42 pm

Lost images by pete
May 17, 2019, 04:41:51 am

Q's on Integrating SMF Classifieds with current theme by ajac63
May 08, 2019, 01:46:06 pm

Just a hello by SMFHacks
May 06, 2019, 10:30:20 pm

Contact Page Problem by Acans
May 06, 2019, 01:54:08 am

Trying to install 8.0.5a after upgrade to RC2 by SMFHacks
April 30, 2019, 06:04:34 am

Powered by EzPortal