Jump to content

Weird issue with slashes setting automatically changing


muzzer
 Share

Recommended Posts

I have just upgraded a site from 2.7 to latest v3.

I have run into a weird issue where a page template setting for slashUrls changes from No to Yes immediately after an ajax call, causing the second ajax call on the page to use the wrong setting.

There is no reference to the $template->slashUrls() in any of my code.

This happens every time I load the page, it's 100% consistent.

I have this running on a second machine under v2.7 and no such weirdness.

I'm lost as to why this is happening, what would cause a PW setting change for slashUrls? Anyone have any ideas?

 

 

 

Link to comment
Share on other sites

OK, this is getting weirder. I've narrowed it down to WHAT is causing this bad behaviour but not WHY it's happening.

The ajax call (which results in the PW template fields resetting) is returning html which includes among a lot of other stuff the $image->url of an image which has been removed from the file system but is still on the PW page.

$html .= '<img src="' . $thumb1->url . '" width="46%" height="" />';

$image1->url is returning correct path  /site/assets/files/89034/images1.250x180.jpg

but the image file does not exist. If I remove this line from the returned ajax ill is fine, but as soon as I add it back in the template fields all reset.

I've discovered it's not solely the slashUrls field that is reverting but ALL the fields on the template are changing back to what I assume is default PW template settings.

I'm totally puzzled as to why accessing a non-existent image in this way would cause this behaviour, any help appreciated ?

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...