Advertisement:

Author Topic: problem with submit new mod to site  (Read 3454 times)

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
problem with submit new mod to site
« on: October 20, 2017, 09:00:05 AM »
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
Code: [Select]
<id>alex_qrlogin:qrLogin</id>

Offline sǝๅqɯɐɥS

  • SMF Hero
  • ******
  • Posts: 4,510
  • Gender: Male
    • i30 Owners Club
Re: problem with submit new mod to site
« Reply #1 on: October 20, 2017, 09:18:16 AM »
What else is in your package-info.xml file? Can you paste the contents here?

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #2 on: October 20, 2017, 09:37:21 AM »
Code: [Select]
<?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>

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,035
    • Arantor on GitHub
Re: problem with submit new mod to site
« Reply #3 on: October 20, 2017, 09:40:51 AM »
Can you upload the package here please?
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #4 on: October 20, 2017, 09:42:29 AM »
Just was going to ;D

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,035
    • Arantor on GitHub
Re: problem with submit new mod to site
« Reply #5 on: October 20, 2017, 09:53:20 AM »
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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #6 on: October 20, 2017, 10:00:08 AM »
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)

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #7 on: October 20, 2017, 10:09:09 AM »
changed archive
the result is the same ((

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,035
    • Arantor on GitHub
Re: problem with submit new mod to site
« Reply #8 on: October 20, 2017, 10:25:14 AM »
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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #9 on: October 20, 2017, 10:34:22 AM »
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 ((

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,930
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: problem with submit new mod to site
« Reply #10 on: October 20, 2017, 12:26:05 PM »
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
Support the SMF Support team!
Profiles:
GitHub

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,035
    • Arantor on GitHub
Re: problem with submit new mod to site
« Reply #11 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...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #12 on: October 20, 2017, 12:31:00 PM »
ohhhh)))
eternal problem with mac)))
Thank you!

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #13 on: October 20, 2017, 12:38:14 PM »
It seems to be removed
And the result does not change ((

Offline sǝๅqɯɐɥS

  • SMF Hero
  • ******
  • Posts: 4,510
  • Gender: Male
    • i30 Owners Club
Re: problem with submit new mod to site
« Reply #14 on: October 20, 2017, 12:43:08 PM »
I downloaded, unzipped then rezipped your package (unchanged) using 7-zip

Try submitting this, just to see.

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #15 on: October 20, 2017, 01:25:26 PM »
Yes!!!
Thank you!
Submitted

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,930
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: problem with submit new mod to site
« Reply #16 on: October 20, 2017, 07:48:14 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:
Code: [Select]
$ 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
Support the SMF Support team!
Profiles:
GitHub

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #17 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?

Offline Antes

  • Evil Black Cat
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,646
  • Gender: Male
  • Black cat rulz!
    • Antes on GitHub
    • merta on LinkedIn
    • @antesistan on Twitter
    • Lunarfall
Re: problem with submit new mod to site
« Reply #18 on: October 25, 2017, 03:14:48 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?
Active Project(s): [ SimpleDesk ] # [ Lunarfall ] # [ CoreStore ]

Past Project(s): [ ezPortal ]

Offline alex_qrlogin

  • Semi-Newbie
  • *
  • Posts: 36
    • qrlogi on Facebook
    • qrLogin
Re: problem with submit new mod to site
« Reply #19 on: October 25, 2017, 03:25:03 AM »
1) Depends on the que & schedule of the team members.
This is understandable)) But I would like to understand more accurately
2) Coding discussion maybe?
Maybe or yes? Or is there a special topic?