News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

problem with submit new mod to site

Started by alex_qrlogin, October 20, 2017, 09:00:05 AM

Previous topic - Next topic

alex_qrlogin

Hi All

I'm trying to put a modification and get an error:
An Error Has Occurred!
You must upload a package file containing package-info.xml which contains the package id when submitting a mod to this site


What is it?
package id is <id>alex_qrlogin:qrLogin</id>

Shambles

What else is in your package-info.xml file? Can you paste the contents here?

alex_qrlogin

<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">

<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>alex_qrlogin:qrLogin</id>
<name>qrLogin</name>
<type>modification</type>
<version>0.9.1</version>

<install for="2.0 - 2.0.99">
<redirect url="?action=qrlogin;qra=page">qrlogin intalled</redirect>
<readme lang="english">ReadMe.txt</readme>
<readme lang="russian-utf8">ReadMe.ru</readme>
<require-file name="qrlogin.php" destination="$sourcedir" />
<require-file name="qrlogin.template.php" destination="$themedir" />
<require-dir name="qrlogin" destination="$themedir" />
<require-file name="qrlogin.english.php" destination="$languagedir" />
<require-file name="qrlogin.russian-utf8.php" destination="$languagedir" />
<modification type="file">qrlogin.xml</modification>
<code type="inline">
<?php
// Settings
$smcFunc['db_query'](''"INSERT IGNORE INTO {db_prefix}settings VALUES ('qrlogin_del_http', '1')");
$smcFunc['db_query'](''"INSERT IGNORE INTO {db_prefix}settings VALUES ('qrlogin_login_timeout', '3')");
$smcFunc['db_query'](''"INSERT IGNORE INTO {db_prefix}settings VALUES ('qrlogin_timeout', '1')");
$smcFunc['db_query'](''"INSERT IGNORE INTO {db_prefix}settings VALUES ('qrlogin_poll_lifetime', '30')");
$smcFunc['db_query'](''"INSERT IGNORE INTO {db_prefix}settings VALUES ('qrlogin_post_timeout', '5')");
$smcFunc['db_query'](''"INSERT IGNORE INTO {db_prefix}settings VALUES ('qrlogin_qrcode_size', '128')");
// Create the qrLogin Table
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}qrlogin(
    sid varchar(32) NOT NULL default '',
    uid int unsigned NOT NULL default 0,
    result smallint unsigned NOT NULL default 0,
    PRIMARY KEY  (sid)
)"
);
?>

</code>
</install>

<uninstall for="2.0 - 2.0.99">
<readme lang="english">ReadMe.txt</readme>
<readme lang="russian-utf8">ReadMe.ru</readme>
<remove-file name="$sourcedir/qrlogin.php" />
<remove-file name="$themedir/qrlogin.template.php" />
<remove-dir name="$themedir/qrlogin" />
<remove-file name="$languagedir/qrlogin.english.php" />
<remove-file name="$languagedir/qrlogin.russian-utf8.php" />
<modification type="file" reverse="true">qrlogin.xml</modification>
<code  type="inline">
<?php
// Settings
$smcFunc['db_query'](''"DELETE FROM {db_prefix}settings WHERE variable IN ('qrlogin_del_http', 'qrlogin_login_timeout', 'qrlogin_timeout', 'qrlogin_poll_lifetime', 'qrlogin_post_timeout', 'qrlogin_qrcode_size')");
// Delete the qrLogin Table
$smcFunc['db_query'](''"DROP TABLE  {db_prefix}qrlogin");
?>

</code>
</uninstall>
</package-info>

Arantor

Can you upload the package here please?

alex_qrlogin


Arantor

Your problem is that you've put it inside a folder. The package-info.xml file really should be in the top level of the zip file rather than in a folder.

alex_qrlogin

You are sure?
In all the packages that I watched just such a structure ...
Can you confuse the presence inside another nested directory qrlogin?

ps - sorry - i understud)

alex_qrlogin

changed archive
the result is the same ((

Arantor

I'm sure that's how it's supposed to be. SMF doesn't always find it correctly if it's placed inside a folder though it tries - which is why we said several years ago it should always be done that way. (I used to be on the review team... 8 years ago. Eek.)

I'm trying to remember if _ is a valid character in the spec for package ids, but I don't remember for sure. Try taking it out.

Also, as a tip for the approvals process as it currently is, queries inline in the installer aren't recommended, database tables should be added with $smcFunc['db_create_table'] and indicated via a <database> tag so the uninstaller can ask the user whether to remove the data or not (and do it automatically without you having to explicitly have an uninstaller for that)

$smcFunc['db_insert'] is also capable of doing insertions for you, though you could take it further and simply check whether things already exist in $modSettings and then just call updateSettings() for the things that don't during the install.

alex_qrlogin

Thank you very much for your advice))
I have the experience of smf - 0))

but the problem is not in the "_"
tried to remove - the result is the same ((

SleePy

You are packing it using the built in Mac OS X zip utility.  I've seen it cause problems with package manager and uncompressing archives.  In addition the built in utility also archives the resource fork data as well which really junks up archives.

You should have better luck with a 3rd party zip (or tar gz) program, or using the command line.

Quote$ unzip -l qrLogin_0.9.1.zip
Archive:  qrLogin_0.9.1.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     2719  10-20-2017 05:44   package-info.xml
        0  10-20-2017 07:00   __MACOSX/
      212  10-20-2017 05:44   __MACOSX/._package-info.xml
        0  10-20-2017 04:29   qrlogin/
    12224  10-20-2017 04:29   qrlogin/apple-button.svg
        0  10-20-2017 07:00   __MACOSX/qrlogin/
      212  10-20-2017 04:29   __MACOSX/qrlogin/._apple-button.svg
    18797  10-20-2017 04:29   qrlogin/google-button.svg
      212  10-20-2017 04:29   __MACOSX/qrlogin/._google-button.svg
    14097  10-20-2017 04:29   qrlogin/logo.svg
      212  10-20-2017 04:29   __MACOSX/qrlogin/._logo.svg
    33168  10-20-2017 04:29   qrlogin/qrcode.js
      212  10-20-2017 04:29   __MACOSX/qrlogin/._qrcode.js
     3098  10-20-2017 04:29   qrlogin/QRlogin60.png
      212  10-20-2017 04:29   __MACOSX/qrlogin/._QRlogin60.png
      212  10-20-2017 04:29   __MACOSX/._qrlogin
     4346  10-20-2017 04:37   qrlogin.english.php
      212  10-20-2017 04:37   __MACOSX/._qrlogin.english.php
     6819  10-20-2017 04:35   qrlogin.php
      212  10-20-2017 04:35   __MACOSX/._qrlogin.php
     6652  10-20-2017 04:37   qrlogin.russian-utf8.php
      212  10-20-2017 04:37   __MACOSX/._qrlogin.russian-utf8.php
    10601  10-20-2017 04:28   qrlogin.template.php
      212  10-20-2017 04:28   __MACOSX/._qrlogin.template.php
     1219  10-20-2017 04:13   qrlogin.xml
      212  10-20-2017 04:13   __MACOSX/._qrlogin.xml
      908  10-20-2017 05:00   ReadMe.ru
      212  10-20-2017 05:00   __MACOSX/._ReadMe.ru
      545  10-20-2017 04:57   ReadMe.txt
      212  10-20-2017 04:57   __MACOSX/._ReadMe.txt
---------                     -------
   118161                     30 files
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Arantor

I did see the _MACOSX folder but didn't remember if there was still a problem with unpacking those or not. I assumed SMF itself could unpack them because I assumed it had been tested first...

alex_qrlogin

ohhhh)))
eternal problem with mac)))
Thank you!

alex_qrlogin

It seems to be removed
And the result does not change ((

Shambles

I downloaded, unzipped then rezipped your package (unchanged) using 7-zip

Try submitting this, just to see.

alex_qrlogin


SleePy

Quote from: Arantor on October 20, 2017, 12:27:34 PM
I did see the _MACOSX folder but didn't remember if there was still a problem with unpacking those or not. I assumed SMF itself could unpack them because I assumed it had been tested first...
SMF will ignore the files because they are not needed to install the mod, but it is in general just ugly stuff.

When I do mine, I run:

$ cd workdir
$ COPYFILE_DISABLE=1 tar -czf ../archive.tar.gz ./package-info.xml ./other.txt ./files.xml ./specified.png

workdir is where the files are and the archive goes into the parent.

It provides a clean archive without any junk.  Mac likes to include all the stuff.  I didn't bother replacing tar with homebrews version, as I think it has the same issue.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

alex_qrlogin

Good afternoon
I have two questions:
1 - how long to wait for the "mod" check? a week? month? and how do I know the result?
2 - can I place somewhere not tested "mod" and get feedback and comments from users?

Antes

Quote from: alex_qrlogin on October 25, 2017, 02:59:59 AM
Good afternoon
I have two questions:
1 - how long to wait for the "mod" check? a week? month? and how do I know the result?
2 - can I place somewhere not tested "mod" and get feedback and comments from users?

1) Depends on the que & schedule of the team members.
2) Coding discussion maybe?

alex_qrlogin

Quote from: Antes on October 25, 2017, 03:14:48 AM
1) Depends on the que & schedule of the team members.
This is understandable)) But I would like to understand more accurately
Quote from: Antes on October 25, 2017, 03:14:48 AM
2) Coding discussion maybe?
Maybe or yes? Or is there a special topic?

Advertisement: