INSERT INTO `cp_filehtml` (`id`,`modul`,`app`,`path`,`type`,`cat`,`file_name`,`content`) VALUES ('327','post','1','u2/creator','0','js','post-edit.js-','$(document).on(\\\'click\\\', \\\'#update-post\\\', async function (e) {\r\n var view = app.views.current\r\n const description = $(\\\'#post_content\\\').val();\r\n const postId = $(\\\'#edit_post_id\\\').val();\r\n const data = {\r\n post_id: postId,\r\n caption: description\r\n }\r\n try {\r\n app.preloader.show()\r\n const response = await updatePost(data)\r\n app.preloader.hide()\r\n if (!response || response.error) {\r\n throw new Error(response.error);\r\n }\r\n showToast(\\\'Post updated successfully\\\')\r\n // fine elem with data-post-id=\\\"52\\\" and update the .media-post-description .post-caption text\r\n var postElem = $(`[data-post-id=\\\"${postId}\\\"]`).find(\\\'.media-post-description\\\')\r\n const maxDescriptionLength = 200; // Set your character limit here\r\n const isLongDescription = description.length > maxDescriptionLength;\r\n const shortDescription = isLongDescription ? description.slice(0, maxDescriptionLength) : description;\r\n // for each postElem, loop through and update the .post-caption and .full-description hidden input\r\n postElem.each(function () {\r\n var postCaption = $(this).find(\\\'.post-caption\\\');\r\n var fullDescription = $(this).find(\\\'.full-description\\\');\r\n postCaption.text(shortDescription);\r\n fullDescription.val(description);\r\n });\r\n store.dispatch(\\\'updatePost\\\', {\r\n post_id: postId,\r\n caption: description\r\n })\r\n view.router.back()\r\n } catch (error) {\r\n app.notification.create({\r\n titleRightText: \\\'now\\\',\r\n subtitle: \\\'Oops, something went wrong\\\',\r\n text: error.message || \\\'Failed to update post\\\',\r\n }).open()\r\n app.preloader.hide()\r\n }\r\n})');
Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '327' for key 'PRIMARY' in /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/common.function.php:186 Stack trace: #0 /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/common.function.php(186): mysqli_query() #1 /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/inc.filehtml.php(89): Insert() #2 /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/index.php(282): include('/home/u34052401...') #3 {main} thrown in /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/common.function.php on line 186
Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '327' for key 'PRIMARY' in /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/common.function.php:186 Stack trace: #0 /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/common.function.php(186): mysqli_query() #1 /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/inc.filehtml.php(89): Insert() #2 /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/index.php(282): include('/home/u34052401...') #3 {main} thrown in /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/common.function.php on line 186