Skip to content

Commit 2ec11a2

Browse files
updated
1 parent a5a0547 commit 2ec11a2

File tree

6 files changed

+473
-395
lines changed

6 files changed

+473
-395
lines changed

animation-addons-for-elementor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Plugin Name: Animation Addons for Elementor
3+
* Plugin Name: Animation Addons
44
* Description: Animation Addons for Elementor comes with GSAP Animation Builder, Customizable Widgets, Header Footer, Single Post, Archive Page Builder, and more.
55
* Plugin URI: https://animation-addons.com/
66
* Version: 2.3.8

inc/admin/base/Downloader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private function get_content_from_url( $url ) {
6060
// Get file content from the server.
6161
$response = wp_remote_get(
6262
$url,
63-
array( 'timeout' => Helpers::apply_filters( 'aaeaddon/timeout_for_downloading_import_file', 20 ) )
63+
array( 'timeout' => Helpers::apply_filters( 'aaeaddon/timeout_for_downloading_import_file', 45 ) )
6464
);
6565

6666
// Test if the get request was not successful.

inc/admin/dashboard/src/pages/DemoImporting.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ const DemoImporting = () => {
9696
delete tpldata.is_pro;
9797
delete tpldata.excerpt;
9898
setTempState(tpldata);
99+
99100
const formData = new URLSearchParams();
100101

101102
if (tpldata?.next_step && tpldata.next_step == "download-xml-file") {
@@ -140,7 +141,7 @@ const DemoImporting = () => {
140141
: prevProgress
141142
);
142143
}
143-
144+
144145
if (data?.template) {
145146
const completed =
146147
data.template.next_step?.trim().toLowerCase() === "done";
@@ -164,8 +165,13 @@ const DemoImporting = () => {
164165
runImport(tpldata);
165166
}
166167
} catch (error) {
168+
console.error("Fetch failed:", error.message);
169+
170+
setMsg(error.message);
167171
if (tempstate) {
168172
runImport(tempstate);
173+
}else{
174+
changeRoute("fail-import", { plugins, theme, attachment , msg: error.message });
169175
}
170176
}
171177
}, 300),

inc/admin/dashboard/src/pages/FailImport.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const FailImport = () => {
77
const templateid = url.searchParams.get("templateid");
88
const plugins = url.searchParams.get("plugins");
99
const theme = url.searchParams.get("theme");
10+
const msg = url.searchParams.get("msg");
1011

1112
const changeRoute = (value) => {
1213
const pageQuery = url.searchParams.get("page");
@@ -30,7 +31,7 @@ const FailImport = () => {
3031
<div className="mb-6">
3132
<h3 className="text-2xl font-medium">Fail to Import</h3>
3233
<p className="mt-1.5 text-text-secondary">
33-
An issue occurred while importing
34+
An issue occurred while importing {msg? `: ${msg}` : "" }
3435
</p>
3536
</div>
3637
<div className="mb-6">

0 commit comments

Comments
 (0)