Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Internal error creating CSS: undefined is not an object at script line 970

New Here ,
Feb 25, 2016 Feb 25, 2016

When trying to copy css from a layer I get

Internal error creating CSS: undefined is not an object at script line 970

Screen Shot 2016-02-25 at 2.18.31 PM.png

I have updated to the most recent version. I am on a Mac using the most recent version of the system software. The PSD file was created by another person and sent to me.

TOPICS
Actions and scripting
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
New Here ,
Jun 03, 2016 Jun 03, 2016

Has anyone found an answer for this?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 03, 2016 Jun 03, 2016

I do not do Web stuff.  From what I read Copy CSS should copy to the clipboard CSS code requires for text layers, Shape and Groups that you can then pasted into your style sheet document.  The script that is failing on you is most likely "CopyCSSToClipboard.jsx" in Photoshop required folder. I use windows yor Mac script and its location may different from my windows version.  When I try to use copy css on text and shape layers I do not find any text in my Windows clipboard. I do not know or care if that not working correctly on my machine for I do for create CSS documents.

On windows CC 2015 line 970 is:

if (matteStops.location == colorStops.location)

that is in the function starting on line 879

// Gradient format: linear-gradient( <angle>, rgb( rr, gg, bb ) xx%, rgb( rr, gg, bb ), yy%, ... );

PSLayerInfo.prototype.gradientColorStops = function()

It turns out that Copy CSS was not working in my CC 2015 because I uncheck export Clipboard in my Photoshop Preferences. When I check it Copy CSS works.  I can past the clipboard into Photoshop Text Tool.

Capture.jpg

Gradients seem to work OK.

Capture.jpg

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 04, 2016 Jun 04, 2016

Does it fail on all layers or just the ones that have gradients?

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 11, 2018 Jun 11, 2018

For me it fails only on gradient layer Zrzut ekranu 2018-06-11 o 17.07.40.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 21, 2020 Dec 21, 2020
LATEST

Hi,

I have the same error. I am also tried to export css of gradient. I work olso from mac, Photoshop 2021

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines