Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.2k views
in Q2A Core by

Hello!

I need some help.  I accidentally entered the following text into the Admin / Layout / Sidepanel textarea (and saved it):

 

Blah Blah <BR/>

<A href="XYZ.comCLICKME</A> 

 

Where the obvious flaws were both the missing closing quotation mark and the missing closing bracket (>).  This, understandably, has made every page including the Admin / Layout page render the "Blah Blah" part, then eliminates pretty much all functionality, most importantly, the ability to change/clear it or reset it to the default state using the button made for doing so on that page. 

 

Since I am just starting to learn Q2A, I'm having trouble figuring out how to easily fix this problem, and more to the point, where the data (e.g., the flawed HTML I wrote) is actually stored.  Can someone please help me fix this?

 

(BTW: I am currently using the included "Candy" theme, if that is relevant.)

 

Thank you!

Q2A version: 1.7.3
by
can u share your URL?
by
I guess I CAN,... but (A) it wouldn't have helped, to be honest, and (B) I'm just not ready yet!  But thanks for your comment/attempt to provide assistance!  I do appreciate that, Mayuresh! :)

2 Answers

+2 votes
by
selected by
 
Best answer

Two other ways to do this:

  1. Use the dev tools in your browser (Chrome/Firefox). Right click then "Inspect element". In the dialog that appears, remove the bad HTML code. You can right click an element in the Elements tab of the dev tools and use "Edit as HTML".
  2. Edit the value in the database directly (for example using phpMyAdmin). Look for the "custom_sidepanel" option in the qa_options table.
by
Thanks Scott!  

I tried part one of your answer, but couldn't get the changes to take effect.  I rarely utilize these useful (dev)tools, opting for a more hands-on approach.  Well, I do use "view source", of course, and I guess I could make the change to the HTML that is rendered and then save that (.html/.htm) file to the same directory where the server-side php file would have effectively rendered it...is that what you're saying?  I just don't know how to use the dev tools to make changes actively, or in real-time (?) I guess that's what you would call it.  (yet anyway!)

I searched the db manually and using SQL commands, and I COULD NOT find that entry anywhere! (Doh!)  Thanks for actually answering the second part of my question, which was "Where is the data stored?"      

I'm starting to learn where things are!  Thx 4 the help!
+1 vote
by
edited by

Actually, it just took a little imagination to fix, and I'm pretty much totally blind towards the code and how it works at the moment!  I simply renamed the Candy theme's qa-theme.php file to something like _qa-theme.php temporarily, then made a copy of it (or a blank one would have worked), which was named properly (qa-theme.php).  Then in this new one, I placed the following function override:

 

 public function sidepanel()
 {
  // removes the sidebar altogether for the moment!
   return;
 }

 

Then, the entire site was back to normal, aside from lacking the actual sidepanel itself on every page.  This was not a problem, since all I needed were the controls and text back, and it was for my purposes.  I could sign in as an admin and the textarea with the screwed up HTML I foolishly wrote out of haste populated it as expected.  I could have either corrected it or just deleted the whole boxes contents, (I decided to fix it for some reason.....The adventure, perhaps?!)  So as soon as I clicked save, I just went and deleted the Candy/qa-theme.php file I had created temporarily and then renamed the original one back to the correct name (from _qa-theme.php to qa-theme.php).  Now, every page functions fully again, including the sidepanel and the corrected link I kept in there!  (I deleted the dumb HTML content on the sidepanel right after I saw that It worked as I expected it to).

 

Seems too simple, right?  Well, it pretty much was.  I just had to get that cerebrospinal-fluid percolating again!laughcheekywink 

 

 

...