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

JSON Parse error: Unrecognized token ' #28004

Closed
no-matter-0 opened this issue Feb 21, 2020 · 6 comments
Closed

JSON Parse error: Unrecognized token ' #28004

no-matter-0 opened this issue Feb 21, 2020 · 6 comments

Comments

@no-matter-0
Copy link

when trying to install a very simple plugin I get the error JSON Parse error: Unrecognized token '<'

I can install this plugin on Joomla 3.x but not 4.0

@alikon
Copy link
Contributor

alikon commented Feb 21, 2020

can you share with us the plugin that you are trying to install ?
in this way we can better try to answer you
thanks

@no-matter-0
Copy link
Author

2 files
ymages.xml

<?xml version="1.0" encoding="utf-8"?>
<extension version="3.0" type="plugin" group="system" method="upgrade">
    <name>System - Ymages</name>
    <author>Joomla! Project</author>
    <creationDate>February 2020</creationDate>
    <copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved.</copyright>
    <license>GNU General Public License version 2 or later.</license>
    <authorEmail>web@ymages.com</authorEmail>
    <authorUrl>ymages.com</authorUrl>
    <version>1.0.0</version>
    <description>custom library.</description>

    <files>
        <filename plugin="ymages">ymages.php</filename>
        <filename>index.html</filename>
    </files>
</extension>

ymages.php

<?php
/**
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later.
 */

defined('_JEXEC') or die;

/**
 * Ymages plugin class.
 *
 * @package     Joomla.plugin
 * @subpackage  System.ymages
 */
class plgSystemYmages extends JPlugin
{
    /**
     * Method to register custom library.
     *
     * return  void
     */
    public function onAfterInitialise()
    {
        JLoader::registerPrefix('Ymages', JPATH_LIBRARIES . '/ymages');
    }
}

@no-matter-0
Copy link
Author

the plugin is installed and works but I get this error

@chmst
Copy link
Contributor

chmst commented Feb 21, 2020

I could install on both, J3.9.15 and J4 without error

Use <name>plg_system_ymages</name>
and remove line <filename>index.html</filename>.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28004.

@no-matter-0
Copy link
Author

Then I have to try a clean install

thanks


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28004.

@brianteeman
Copy link
Contributor

Closed as not a core joomla issue

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

No branches or pull requests

5 participants