• Welcome to the official support community for the Marketers Delight WordPress theme. Most content here is private and to ask questions, get official support, and network with other WordPress users please register and verify your forum account to start posting today.

Try out the new Marketers Delight 5.3 Beta Today

gauravtiwari

Blogger
Messages
226
Reaction score
97
Website
gauravtiwari.org
What will happen to existing dropins in my child theme? Do I need to make any changes? I mean, I have modified some code.


Well, I should better try to see.
 
Comment

Alex

MD developer
Messages
5,841
Reaction score
1,646
What will happen to existing dropins in my child theme? Do I need to make any changes? I mean, I have modified some code.


Well, I should better try to see.
Great question. No Drop-ins in your child theme will be affected, and any templates you overwrote in your child theme /templates/ folder will still have a higher priority. MD only moves official Drop-ins found within the theme to the new location in wp-content.
 
Comment

Alex

MD developer
Messages
5,841
Reaction score
1,646
View attachment 3244

Where are the header and footer scripts? How can I disable Share buttons?
Share and Scripts are both Drop-ins. The upgrade process should have moved and activated the Drop-ins you enabled from MD5.2 and preserved the settings data. You can toggle these both from the MD > Drop-ins page.
 
Comment

gauravtiwari

Blogger
Messages
226
Reaction score
97
Website
gauravtiwari.org
Does the MD parent theme have the dropins folder still, and has the new wp-content/md-dropins directory been created?
- Yes. MD still has Dropins folder.
- No. wp-content/md-dropins didn't get created.
 
Comment

Alex

MD developer
Messages
5,841
Reaction score
1,646
Does the MD parent theme have the dropins folder still, and has the new wp-content/md-dropins directory been created?
- Yes. MD still has Dropins folder.
- No. wp-content/md-dropins didn't get created.
Ok, that's good news. We can try a workaround until I get to the bottom of why this didn't run automatically for you.

Open /marketers-delight/lib/admin/admin.php

Go to line 163 and remove the if() conditional, which will now leave the MD.moveDropins(); script to load in the admin unconditionally:

PHP:
if ( md_setting( 'move_dropins' ) )

Go back to your admin panel and do a hard refresh once. That will now allow this script to perform. Next, go back to the file and put the if() condition back; we only need that script to run once.

That should move the Drop-ins folders and update the MD > Drop-ins page with the list of activated/deactivated Drop-ins. Let me know how this goes.
 
Comment

Alex

MD developer
Messages
5,841
Reaction score
1,646
Then, re-save the MD admin settings to fully rebuild your stylesheet.
 
Comment

gauravtiwari

Blogger
Messages
226
Reaction score
97
Website
gauravtiwari.org
Ok, that's good news. We can try a workaround until I get to the bottom of why this didn't run automatically for you.

Open /marketers-delight/lib/admin/admin.php

Go to line 163 and remove the if() conditional, which will now leave the MD.moveDropins(); script to load in the admin unconditionally:

PHP:
if ( md_setting( 'move_dropins' ) )

Go back to your admin panel and do a hard refresh once. That will now allow this script to perform. Next, go back to the file and put the if() condition back; we only need that script to run once.

That should move the Drop-ins folders and update the MD > Drop-ins page with the list of activated/deactivated Drop-ins. Let me know how this goes.
This didn't work. Here's the error that I received after removing if() arg:

An error of type E_PARSE was caused in line 164 of the file /srv/htdocs/wp-content/themes/marketers-delight/lib/admin/admin.php. Error message: syntax error, unexpected 'wp_add_inline_script' (T_STRING)

Also the folders aren't moving/being created.

I am switching to 5.2.3 for time being. Will test this on a staging site.
 
Comment

Alex

MD developer
Messages
5,841
Reaction score
1,646
This didn't work. Here's the error that I received after removing if() arg:

An error of type E_PARSE was caused in line 164 of the file /srv/htdocs/wp-content/themes/marketers-delight/lib/admin/admin.php. Error message: syntax error, unexpected 'wp_add_inline_script' (T_STRING)

Also the folders aren't moving/being created.

I am switching to 5.2.3 for time being. Will test this on a staging site.
Been monitoring your progress, thanks for the responses. If you are switching back, you will most likely want to do it from a site restore.

That error suggests the if statement wasn't properly removed. It should look like this with the if() removed:

Screen Shot 2021-06-08 at 1.26.01 AM.png

Also, what host are you?
 
Comment

gauravtiwari

Blogger
Messages
226
Reaction score
97
Website
gauravtiwari.org
Parse error is fixed but still the md-dropins folder isn't being created.

I'm on WordPress.com Business (Nginx Server).

Here's the Debug warning:

PHP Warning: copy(): The first argument to copy() function cannot be a directory in /wordpress/core/5.7.2/wp-admin/includes/class-wp-filesystem-direct.php on line 309
 
2 Comments
Alex
Alex commented
Investigating.
 
Alex
Alex commented
@gauravtiwari I've found a possible workaround here and will have a patch for this soon. There's something about your host that handles how directories are moved differently than most, so hopefully I've found a more universal approach.
 

amalseed

MD customer
Messages
196
Reaction score
39
Hey Alex, I uploaded the beta to my test site https://10am.com.au/ - see the results by clicking through to any page...

The homepage is a custom page, any ideas?
 
Last edited:
Comment

Alex

MD developer
Messages
5,841
Reaction score
1,646
Where would I find that?
Open you wp-config.php file and add these lines:

PHP:
define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );

Now refresh the page(s) on your site that throw the error. In your wp-content a debug.log file will be created. Open it up and you'll be able to see any errors, and paste them here.

Are you able to visit WP admin? What does your MD > Drop-ins page look like? Apart from the fatal error, it looks like your site may have taken to the update well...
 
Comment

amalseed

MD customer
Messages
196
Reaction score
39
I don't have any errors as such, its just not displaying anything under the header...

The backend all looks good... See screenshot of dropins page...
 

Attachments

  • screencapture-10am-au-wp-admin-admin-php-2021-06-08-16_47_06.png
    screencapture-10am-au-wp-admin-admin-php-2021-06-08-16_47_06.png
    243.1 KB · Views: 2
Comment
Top