Error when trying to replace string
jfranco 0
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: Error when trying to replace string
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Error when trying to replace string
Thanks Julio. I had in the past bad experience with a few customers who removed the notice. I am always enforcing this part of the license agreement after there are also customers who have paid for the removal.
I see what the problem is. Some variables have already escaped quotes ($zid, $extra1) and some are not ($rows[$search_field])
The following change should fix this problem:
I have added back StoryTeller to our footer (which was unintentionally missed)
Thanks Julio. I had in the past bad experience with a few customers who removed the notice. I am always enforcing this part of the license agreement after there are also customers who have paid for the removal.
confirm that the code above does not fix the search & replace functionality in cadmin/mod_reviews.php
I see what the problem is. Some variables have already escaped quotes ($zid, $extra1) and some are not ($rows[$search_field])
The following change should fix this problem:
$out_field = str_replace(stripslashes($zid), stripslashes($extra1), $rows[$search_field]);
1 Re: Error when trying to replace string
jfranco
OP
0
From: -
From: -
Error when trying to replace string
Bumping this thread just so you know I have added back StoryTeller to our footer (which was unintentionally missed), and to confirm that the code above does not fix the search & replace functionality in cadmin/mod_reviews.php.
Thanks
Julio
Bumping this thread just so you know I have added back StoryTeller to our footer (which was unintentionally missed), and to confirm that the code above does not fix the search & replace functionality in cadmin/mod_reviews.php.
Thanks
Julio
1 Re: Error when trying to replace string
jfranco
OP
0
From: -
From: -
Error when trying to replace string
Hey, just checked this thread... I will add the notice now. With all the changes and stuff going on I didn't remember about that.
However, you probably missed on my previous response that the code you provided to fix the search and replace feature actually messed up my whole database. I had to restore from a backup.
Hey, just checked this thread... I will add the notice now. With all the changes and stuff going on I didn't remember about that.
However, you probably missed on my previous response that the code you provided to fix the search and replace feature actually messed up my whole database. I had to restore from a backup.
1 Re: Error when trying to replace string
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Error when trying to replace string
Your site is still violating the license agreement. You need to either restore the “Powered by” notice or buying the branding free option.
Your site is still violating the license agreement. You need to either restore the “Powered by” notice or buying the branding free option.
1 Re: Error when trying to replace string
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Error when trying to replace string
Looks great . Don't forget to re-add the powered by notice.
BTW, check out TechSpot's new redesign: http://www.techspot.com
Looks great . Don't forget to re-add the powered by notice.
1 Re: Error when trying to replace string
iampedro 13
From: -
From: -
Error when trying to replace string
Is this whole site based upon Storyteller CMS besides the forum?
Is this whole site based upon Storyteller CMS besides the forum?
1 Re: Error when trying to replace string
jfranco
OP
0
From: -
From: -
Error when trying to replace string
For a second I really sweat it...
Unfortunately I tried this on a live environment and it caused all review pages to be overwritten by the first page content. Furthermore, it removed all special code like links, images, etc... it was all converted to plain text.
Thank god for backups!
BTW, check out TechSpot's new redesign: http://www.techspot.com
You may want to update the examples page here in Esselbach.
Thanks
Julio
For a second I really sweat it...
Unfortunately I tried this on a live environment and it caused all review pages to be overwritten by the first page content. Furthermore, it removed all special code like links, images, etc... it was all converted to plain text.
Thank god for backups!
BTW, check out TechSpot's new redesign: http://www.techspot.com
You may want to update the examples page here in Esselbach.
Thanks
Julio
1 Re: Error when trying to replace string
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Error when trying to replace string
This problem is in the latest version as well . I guess a new maintenance release of Storyteller CMS is now overdue.
The fix is easy. Open cadmin/mod_reviews.php in an editor and replace:
with:
This problem is in the latest version as well . I guess a new maintenance release of Storyteller CMS is now overdue.
The fix is easy. Open cadmin/mod_reviews.php in an editor and replace:
DBQuery("UPDATE esselbach_st_review SET $search_field = '$out_field', review_editip = '$ipaddr' WHERE review_id = '$rows[review_id]'");
with:
DBQuery("UPDATE esselbach_st_review SET $search_field = '".addslashes($out_field)."', review_editip = '$ipaddr' WHERE review_id = '$rows[review_id]'");
I recently tried to replace "bigbox" string for "erabigbox" in all of my reviews using the built-in search & replace feature but was welcome by the following message:
Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JavaScript' type='text/javascript'>
Is this something you have fixed on newer versions of the CMS, and/or is there a workaround for this if I want to make this replacement?
Thanks
Julio