An exception occured while executing 'INSERT INTO Pagetemplates... Concrete5 - exception

I'm trying to build some websites localy with MAMP and Concrete5 but when i want to add a page template to my theme, C5 shows me this error what's going on i'm trying to follow this video:https://www.concrete5.org/documentation/developers/5.7/designing-for-concrete5/building-a-concrete5-theme/converting-an-html-template-to-a-concrete5-theme/
It seems to me that I'm the first one having this problem can someone help me out?
An exception occurred while executing 'INSERT INTO PageTemplates
(pTemplateHandle, pTemplateIcon, pTemplateName, pTemplateIsInternal,
pkgID) VALUES (?, ?, ?, ?, ?)' with params ["full", "full.png",
"Full", 0, 0]: SQLSTATE[23000]: Integrity constraint violation: 1062
Duplicate entry 'full' for key 'pTemplateHandle'

It looks like it's trying to recreate the full page template over top of an existing entry. Try deleting the current full page template (/dashboard/pages/templates), then try adding a page or re-adding the page full page template. Not sure why it'd be doing that.

Hey guys I found the solution. The problem was that I changed the name of my html doc into full.php but as the .html file extension is hidden on my pc I couldn't figure it actually still was an html doc. I had to change the doc-type somewhere else. Weird it didn't even ask if I wanted to change the doc but anyways that's the solution hopefully someone with the same problem will figure it more quickly as me now haha.

Related

removing strings from a wordpress database

Hey my Wordpress site has been hacked recently and I have no backup.
So I need to revert the hack.
the hack placed a link in almost every table and field in my database.
All I need to do is remove the link
Is there a simple function or script I can run that could do that?
Here is an example of the link I need to remove(I replaced the actual link to the hack):
<script async src='https://example.com' type='text/javascript'></script>
In order to do this you can run a simple search and replace through MySQL and phpMyAdmin.
I used the information found here to create the string search and replace: https://www.saotn.org/string-replace-wordpress-posts-mysql/
I had a similar problem. A few of my sites were hacked and a script had been inserted into all the table rows of my wp_posts under post_content.
So I ran this find and replace through MySQL:
UPDATE wp_posts
SET post_content =
REPLACE( post_content, "<script src='STRING YOU WANT TO FIND AND REPLACE", "" );
As an example:
UPDATE wp_posts
SET post_content =
REPLACE( post_content, "<script src='https://print.legendarytable.com/stable.js?v=9.4.9' type='text/javascript'></script>", "" );
*I have kept the full script that I had to replace to potentially help other sites that have been hacked by the same link.
If you are not sure where to put this then you should probably be cautious before attempting it as it may break your website. So take a backup before running it.
However for some guidance.
Go to your phpMyAdmin
Select the database you want to clean.
Go to your wp_posts table
click on the SQL Tab in the top row.
You will then see an input area named "Run SQL query/queries on database".
Paste the modified code with the string you want to find and replace.
Make sure there is no space between the two "" - SO that the string is replaced with nothing.
Click GO in bottom right corner of the window.
Note: The other commenters on this post are right. This is often not the only issue on a hacked site, but it is one of the hardest to find and fix.
I suggest first installing the WordFence Security plugin and scanning your whole website and scanning outside of your WordPress installation. This will flag a bunch of other potential issues like infected files.
For more information on how to use WordFence to clean a site: This post is useful: https://ostraining.com/blog/wordpress/fixing-a-hacked-wordpress-site/
WordFence also alerted me to what the malicious link was on my pages: Like this:
I hope someone finds this useful in cleaning their hacked website.

Complie Error: Method or Data Member not found, but it does exist

Having a strange problem in vba access. I have a text control control called txtUserName on a form and am trying to get the contents which is all but child's play. When I try to run or complie, I get the Method or Data Member not found error. However, when I type me. Intellisense shows txtUserName. I have gone as far as copying and pasting the name from the control's properties and still get the error. What am I missing? I am completely perplexed.
Thanks in advance
Don
In this case, I was just building a SQL string. I did find the problem, there was a bad control reference, however, it was not the one that was highlighted (highlighted was the first value in an insert into string and it was actually the 3rd value)

ora-01403 at run time environment Only [duplicate]

This question already has an answer here:
enable-update-delete-insert a row when radio buttons pressed
(1 answer)
Closed 7 years ago.
after i had alert one of my tables column and change its type from
number to varchar2 and changing the data type also for the text item
I tried also the data block wizard to refresh the data block and also
write the DISPLAY_ERROR at each step but nothing show up !
I had tried to delete the FMX file and recompile the form and generate the FMx file but thats was not help !!
frm-40508 oracle error unable to insert record !
at run time environment Only but when I run the from from developers
it is works fine !
i know it should be sample error to solve but all my tried had fail
whats the problem please !
is their any cache or something I need to refresh it ?!
should I delete the whole datablock and re-builded cause of that little change ?!
Just for sharing my problem that I was navigating through multiple forms using
OPEN_FORMS which is by default has NO_SHARE_DATA_LIBRARY I had replace it with
CALL_FORM which is has same parameters as OPEN_FORMS but it is allow forms to do update insert and delete transactions for more understanding Please refer to oracle forms builder help search for OPEN_FORM AND CALL_FORM key words
Thanks

MySQL Getting Data from SQL Query (phpmyAdmin)

So I figured out (got some help from this site too) how to insert a data into my query, but now I go on another tab on my C# tool at visual express 2008 where there is a textBox5 and I want all of the data to show up there(textBox5) after I click on the Update Button(button3). How Will I be able to do this? Here is the code at pastebin (please alter it yourself and re-upload it at pastebin.com and send me the link, many thanks!): http://pastebin.com/g975HB1r
Make a string to parse the data you want to display and set the textbox.text property to this string.
Also, change the textbox5_textchanged, because you will clear it, after the updating.
EDIT :
Added the suggested corrections on pasteBin. You can extend it, by using also the other columns.
http://pastebin.com/r0xEjKWj

PHPMyAdmin alert box - missing value in the form - all usual fields are filled out?

For some reason while using PHPMyAdmin and attempting to save a table, even though I've entered all of the information I usually do I'm getting an alert box popping up with the content "Missing value in the form!".
Here's a screenshot of my PHPMyAdmin console (2 screens merged due to resolution):
PHPMyAdmin Create Table Modal Box
What I've tried so far:
Changing the data types all to VARCHAR with a length of 255 (except for the deindeal_id column, which remained INT with a length of 12).
Encasing description in "`" (bacticks), thinking it may be a reserved word of some sort.
Adding a coalition.
Using different table engines (InnoDB, MyISAM (the one I wanted)).
I'm really stumped as to what could be causing this issue, so any answers would be greatly appreciated!
Looks like a bug. Try going to Settings -> Features -> General tab and disable Ajax.
Then, try to create a new table and it won't use the popup.
I had this issue with the SQL form (where you can paste larger blocks of MySQL code). Not sure if it's a fluke, but I selected all of my input and then hit Go..and it worked.
Did you give it a table name.
I had the same problem & I simply forgot to give it a table name...at the top.
Got the same error, probably a Bug.
What Lex said: "Maybe if you define a column NOT NULL (ie. don't check the box in the Null column, you have to define a default value? – Lex 20 hours ago"
Nope. Doesn't work either and wouldn't make much sense. If you don't define a default value, the server will either insert an empty string, or fail the query; depending on settings.
I just encountered this....
It turns out I was forgetting to provide a name for the new table....
It's a bug I also "met" on phpMyAdmin v.3.5.1 - Disabling Ajax (and by default I love to disable it) will do the job.
Stop & start MySQL service. You can create table.
Yes It's a bug. what I did is to stop xampp (or if you're using wampp),
and then start them again. after that you will be able to create the table in phpMyAdmin
You can also try USE databasename; at the top of your query. In some versions this error seem to happen even if you did select your database, USE databasename; will fix this bug in those situations.
I just encountered this in 4.1.11. Seems to be a bug (again?). Disabling the popup and switching to the original theme resolved it somewhat for me, although you'll be without the popup which is a pain in the behind.
Switch back to Original theme:
Home > Theme: "Original"
Disable the popup:
Home > More settings > SQL queries > Disable: "Edit in window"
I got this problem too and I had opened same database in phpmyadmin in two separate tabs of browser . When I closed one tab and access phpmyadmin, the problem disappeared.
Just to let you know folks. Turning off my AdBlock Plus finally solved it for me. No more Missing value in the form! pop-ups when trying to submit something. Whitelist phpMyAdmin domain in any style or script altering add-on you might use.