Giter Site home page Giter Site logo

Comments (11)

dinhtungdu avatar dinhtungdu commented on June 27, 2024

Hi @Intelligent2013,

I can't reproduce your issue.

I'm thinking about the permission issue. Can you please download the plugin from https://wordpress.org/plugins/eight-day-week-print-workflow/ and install it manually to see if it fixes your issue?

If the method above doesn't work, can you try setting WP_DEBUG to true and reactivate the plugin to get more clues about what is happening?

from eight-day-week.

Intelligent2013 avatar Intelligent2013 commented on June 27, 2024

Hi @dinhtungdu thank you for your quick answer.

I'm thinking about the permission issue. Can you please download the plugin from https://wordpress.org/plugins/eight-day-week-print-workflow/ and install it manually to see if it fixes your issue

I've downloaded eight-day-week-print-workflow.1.1.2.zip and installed it via 'Upload plugin', and activated - no success, again there isn't 'Print' section.

If the method above doesn't work, can you try setting WP_DEBUG to true and reactivate the plugin to get more clues about what is happening?

In wp-config.php I've set:

define( 'WP_DEBUG', true );

and repeated all steps for reactivate the plugin. No errors or messages. Then deleted it and installed again - no errors or messages.

May be there is some non compatibility between my PHP version 7.3.27 and plugin requirements? What is PHP version do you installed?

from eight-day-week.

dinhtungdu avatar dinhtungdu commented on June 27, 2024

@Intelligent2013 I'm using PHP 7.3.11 for my localhost and EDW works as expected for me.

from eight-day-week.

Intelligent2013 avatar Intelligent2013 commented on June 27, 2024

I've installed AMPPS package - the same issue.

But looks like I've found an issue in the code.
In the file wp-content\plugins\eight-day-week-print-workflow\eight-day-week.php there is code:

function edw_bootstrap() {

	$map = edw_build_namespace_map();

	if ( ! $map ) {
		return;
	}

	$core_file = EDW_INC . 'functions/core.php';

	if( ! isset( $map[ $core_file ] ) ) {
		return;
	}

In my environment (Windows 7 64-bit) $map contains this data:

{ 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\admin-menu-page.php"]=> string(31) "\Eight_Day_Week\Admin_Menu_Page" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\articles.php"]=> string(24) "\Eight_Day_Week\Articles" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\core.php"]=> string(20) "\Eight_Day_Week\Core" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\plugins\article-byline.php"]=> string(128) "\Eight_Day_Week\D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow\Includes\Functions\plugins\Article_Byline" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\plugins\article-count.php"]=> string(127) "\Eight_Day_Week\D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow\Includes\Functions\plugins\Article_Count" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\plugins\article-export.php"]=> string(128) "\Eight_Day_Week\D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow\Includes\Functions\plugins\Article_Export" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\plugins\article-status.php"]=> string(128) "\Eight_Day_Week\D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow\Includes\Functions\plugins\Article_Status" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\plugins\issue-publication.php"]=> string(131) "\Eight_Day_Week\D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow\Includes\Functions\plugins\Issue_Publication" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\plugins\issue-status.php"]=> string(126) "\Eight_Day_Week\D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow\Includes\Functions\plugins\Issue_Status" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\print-issue-columns.php"]=> string(35) "\Eight_Day_Week\Print_Issue_Columns" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\print-issue.php"]=> string(27) "\Eight_Day_Week\Print_Issue" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\sections.php"]=> string(24) "\Eight_Day_Week\Sections" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\taxonomies.php"]=> string(26) "\Eight_Day_Week\Taxonomies" 
["D:\Ampps\www\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\user-roles.php"]=> string(26) "\Eight_Day_Week\User_Roles" 
}

Please note, it contains functions\core.php, but not functions/core.php (as defined the line $core_file = EDW_INC . 'functions/core.php';), therefore function edw_bootstrap() returns none;

I've changed to $core_file = EDW_INC . 'functions\core.php'; and now I see Print section at the left pane. But I didn't try any functions yet and don't sure that are working well. May be I have to change something in another places of code.

from eight-day-week.

dinhtungdu avatar dinhtungdu commented on June 27, 2024

Hi @Intelligent2013, can you please test this branch to check if it fixes your issue? https://github.com/10up/eight-day-week/tree/fix/windows-loading-issue

from eight-day-week.

Intelligent2013 avatar Intelligent2013 commented on June 27, 2024

Hi @dinhtungdu,
no, unfortunately.
The reason:

$core_file = D:\xampp\htdocs\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions/core.php`

$map = 
... 
[D:/xampp/htdocs/testsite/wp-content/plugins/eight-day-week-print-workflow/includes/functions/core.php] => \Eight_Day_Week\Core
...

Therefore,

$core_file = EDW_INC . 'functions/core.php';

should be replaced by:

$core_file = str_replace( "\\", "/", EDW_INC . 'functions/core.php' );

also.

After that I see 'Print' section at left pane, but looks like some functions still unavailable. Especially, I can't find how to export as xml to InDesign feature:
image
image

from eight-day-week.

samthinkbox avatar samthinkbox commented on June 27, 2024

Actually wrong way round for / and \ in str_replace for core.php

$core_file = EDW_INC . 'functions/core.php';
should be replaced by:
$core_file = str_replace( "/", "\", EDW_INC . 'functions/core.php' );

this gets the core loaded but also required is a change on ~ line 142 to get the subdirectory / str_replace correct to gather the plugin file namespaces

$sub_directory = str_replace( $dir . '/', '', $path );
should be replaced by:
$sub_directory = str_replace( $dir . '\', '', $path );

from eight-day-week.

Intelligent2013 avatar Intelligent2013 commented on June 27, 2024

@samthinkbox
In this case I get:

$core_file=D:\xampp\htdocs\testsite\wp-content\plugins\eight-day-week-print-workflow\includes\functions\core.php
$map = 
...
[D:\xampp\htdocs\testsite\wp-content\plugins\eight-day-week-print-workflow/includes/functions\core.php] => \Eight_Day_Week\Core
...

This variant is working for me (Windows)
change from:

define( 'EDW_PATH',    dirname( __FILE__ ) . '/' );
define( 'EDW_INC',     EDW_PATH . 'includes/' );

to:

define( 'EDW_PATH',    dirname( __FILE__ ) . '\\' );
define( 'EDW_INC',     EDW_PATH . 'includes\\' );

from:

$core_file = EDW_INC . 'functions/core.php';

to

$core_file = str_replace( "/", "\\", EDW_INC . 'functions/core.php' );

from:

$sub_directory = str_replace( $dir . '/', '', $path );

to:

$sub_directory = str_replace( $dir . '\\', '', $path );

but I didn't test it on *nix platforms.

from eight-day-week.

mnelson4 avatar mnelson4 commented on June 27, 2024

I think I had a similar issue: EDW wasn't working on my windows system. I fixed it in my fork here: mnelson4@bafe75a

from eight-day-week.

dinhtungdu avatar dinhtungdu commented on June 27, 2024

Hi @mnelson4, it's a great fix! Do you mind creating a PR to fix this issue?

from eight-day-week.

mnelson4 avatar mnelson4 commented on June 27, 2024

Sure #73

from eight-day-week.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.