Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Page Empty -- No Dropdowns #10

Open
pfabri opened this issue Aug 30, 2017 · 3 comments
Open

Plugin Page Empty -- No Dropdowns #10

pfabri opened this issue Aug 30, 2017 · 3 comments

Comments

@pfabri
Copy link

pfabri commented Aug 30, 2017

Expected Behaviour

The plugin page displays plugins available for installation in a drop-down menu.

Actual Behaviour

No drop-downs are displayed at all.

Attempted Solution

Placed allow_url_fopen = 1 and allow_url_include = On both in php.ini and .user.ini, but the problem still persists, unfortunately.

Config

Linux server with PHP7.

image

@Daniel-KM
Copy link
Contributor

Daniel-KM commented Aug 30, 2017

The function tries file_get_contents first when available (see https://github.com/AcuGIS/Escher/blob/master/libraries/Escher/Controller/Action/Helper/Addons.php#L211), so I don't understand the issue. Does file_get_contents($url) work? Can Omeka access this url (https://omeka.org/add-ons/plugins/) (https, not http) ?

@pfabri
Copy link
Author

pfabri commented Aug 30, 2017

Would you please be able to provide and example code to test if it works? Many thanks!

@Daniel-KM
Copy link
Contributor

Daniel-KM commented Aug 30, 2017

$url = 'https://omeka.org/add-ons/plugins';
if (ini_get('allow_url_fopen') && ini_get('allow_url_include')) {
    $result = file_get_contents($url);
    if (empty($result)) {
        echo 'Unable to fetch page.';
    } else {
        // This should be the html of the page.
        echo $result;
    }
} else {
    echo 'Fetch via php curl if extension enabled.';
}

This is a code for an external script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants