diff --git a/src/Manager/WidgetManagerDatabase.php b/src/Manager/WidgetManagerDatabase.php index 4057af3..362ae5a 100644 --- a/src/Manager/WidgetManagerDatabase.php +++ b/src/Manager/WidgetManagerDatabase.php @@ -128,11 +128,10 @@ public function copyWidgets($formPageId, $toPageId) intval($toPageId); intval($formPageId); - $subSelect = DB::table('page_widgets as pw1')->selectRaw("'$toPageId' as page_id, pw1.widget_id, pw1.block, pw1.position, pw1.set_crumbs")->leftJoin('page_widgets as pw2', function ( - $join - ) { - return $join->on('pw1.widget_id', '=', 'pw2.widget_id'); - })->where('pw1.page_id', $formPageId)->toSQL(); + $subSelect = DB::table('page_widgets as pw1') + ->selectRaw("'$toPageId' as page_id, pw1.widget_id, pw1.block, pw1.position, pw1.set_crumbs") + ->where('pw1.page_id', $formPageId) + ->toSQL(); DB::statement("INSERT into page_widgets (page_id, widget_id, block, position, set_crumbs) $subSelect", [ $formPageId,